Can't Scrape Price in HTML_dom and curl

2019-07-25 11:41发布

问题:

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