无法在HTML_dom中刮擦价格并卷曲

时间:2019-06-28 23:54:53

标签: php curl web-scraping simple-html-dom

伙计们,我遇到了这个怪异的问题,我想使用_SIMPLE_HTML_DOM从Aliexpress抓取产品价格,但由于源代码可以找到Inspect元素而无法正常工作,但是当我进入CTRL +时找不到源U

例如

enter image description here

现在这是我按ctrl + u时的源代码

enter image description here

这是我用来抓取的代码

$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;

我遇到此错误:

  

注意:尝试获取非对象的属性“明文”

0 个答案:

没有答案