以前有人问过这个问题,但似乎没有一个能解决我的问题
我尝试在this page中查找元素,但尝试失败:
driver = webdriver.Chrome()
driver.set_window_size(0, 0)
driver.set_window_position(0, 0)
url = "https://www.autotrader.com/cars-for-sale/2003/Aston+Martin/DB7"
driver.get(url)
print (driver.find_element_by_xpath("//span[@data-qaid='txt-lowest-price']").text)
driver.close()
我也不能从这个页面中刮取任何其他数据(按id,按name,按class,按css),所有返回的文本都是空的
如有任何建议或反馈,我们将不胜感激
谢谢你
尝试替换:
使用:
相关问题 更多 >
编程相关推荐