嘿,伙计们,我遇到了这个奇怪的问题,我正在尝试使用 _SIMPLE_HTML_DOM 从 Aliexpress 中获取产品价格,但它不起作用,因为可以找到 Inspect 元素的源代码,但是当我进入 CTRL+U 时我找不到源代码
例如
现在这是我按 ctrl + u 时的源代码
这是我用来抓取的代码
$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;
我收到此错误:
注意:试图获取非对象的属性“明文”