【发布时间】:2014-08-08 06:18:24
【问题描述】:
我的代码是:
driver.get("http://www.thegoodguys.com.au/buyonline/SearchDisplay?pageSize=16&beginIndex=0&searchSource=Q&sType=SimpleSearch&resultCatEntryType=2&showResultsPage=true&pageView=image&searchTerm=laptops")
link=();
linkPrice=();
price=();
productName=[];
Site='Harvey Norman'
link=driver.find_elements_by_class_name("photo")
linkPrice=driver.find_elements_by_class_name("product-title")
price=driver.find_elements_by_xpath("//div[@class='purchase']/span/span")
我不确定提供的 xpath 和 class_name 是否正确。有人可以验证它们,请让我知道如何找到它们
【问题讨论】:
-
没有你的 HTML 没什么好说的
-
他在第一行给出了一个url。
标签: python selenium xpath classname