在這裏第一次......檢索SRC = 「HTTP ...」 與硒的XPath
<img alt="blabla..." src="HTTP://www.blabla..jpg">"
我的代碼:
listF = driver.find_elements_by_xpath("/html/body/div[*]/div[*]/div[*]/div[*]/a/img")
for list in listF:
print(list.text, '-yo')
print(list.tag_name)
print(list)
Returns:
' -yo'
'img'
'selenium.blabla(session = "xxx-xx...", element ="{b7a50cbe-76xx-x...}")>'
我需要的是找回
src="http://britcar.com/shopimages/products/thumbnails/A/AWR/AWR1374.jpg"
有什麼辦法嗎?
在此先感謝。
看起來真像http://stackoverflow.com/questions/12579061/python-selenium-find-object的副本-attributes-使用-的XPath。 – alecxe
@alecxe +1看起來像重複 – drets