在这里第一次......检索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