1

I am trying to scrape the price of product but it not working can someone please help, this is the code :

$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 get this error

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

I want to scrape this price enter image description here

Muhammad Faisal
  • 131
  • 1
  • 2
  • 8
  • No error checking. Are you sure you're getting back from your method calls what you think should be getting back? –  Jun 29 '19 at 00:52
  • 1
    This is the same as your previous question https://stackoverflow.com/questions/56814144/cant-scrape-price-in-html-dom-and-curl. Don't post new question to add information, edit the old one. – Greg Schmidt Jun 29 '19 at 00:53
  • 3
    Possible duplicate of [Can't Scrape Price in HTML\_dom and curl](https://stackoverflow.com/questions/56814144/cant-scrape-price-in-html-dom-and-curl) – Greg Schmidt Jun 29 '19 at 00:53

0 Answers0