我正在尝试从 ebay 上删除产品列表。我可以获得除图像源之外的所有信息。我的查询检索图像的所有信息,即 alt、高度等,但不检索源。
One of the product link I am trying to scrape.
http://www.ebay.com.au/itm/REAR-RAISED-KING-SPRINGS-2-03-ON-TOYOTA-L-CRUISER-PRADO-120-150-GX-KTPR-102-/170945971135?pt=AU_Car_Parts_Accessories&hash=item27cd2c83bf
Query I used
$query1=".//*[@id='i_vv4-35']";
Test to chek if attribute exist returns nothing.
$element1->hasAttribute('src')
Get attribute method.
$element1->getAttribute('src')
问候阿布纳布