Can't Scrape Price in HTML_dom and curl

▼魔方 西西 提交于 2019-12-11 04:49:46

问题


Hey guys i got this weird problem i am trying to scrape product price from Aliexpress using _SIMPLE_HTML_DOM and it is not working because the source code can be find Inspect element but i can't find the source in when i go into CTRL+U

For Example

Now This is the source code when i press ctrl + u

This is the Code i am using to scrape

$curl->get('https://www.aliexpress.com/item/32844492002.html');
$response = $curl->getRawResponse();
$html4 = new simple_html_dom();
$html4->load($response);
$price2 = $html4->find("div[class='product-price'] div[class='product-price-current'] span[class='product-price-value']",0)->plaintext;
echo $price2;

I am Getting This Error :

Notice: Trying to get property 'plaintext' of non-object

来源:https://stackoverflow.com/questions/56814144/cant-scrape-price-in-html-dom-and-curl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!