我找不到漂亮的汤来找到某个元素
我尝试更改它使用的解析器及其搜索内容
url= driver.current_url
#sets the array counter
i = 1
#opens the url
page = urllib2.urlopen(url)
#reads the url
soup = BeautifulSoup(page, 'lxml')
print(soup)
h2 = soup.find_all("h3", {"class": "nbf_carparking_title nbf_tooltip"}) [i]
#sets strong value
strong = soup.find_all("div", {"class": "nbf_fancy_product_results_totalcost2"})[i]
#prints h2 (text)
print(h2).text
print(strong).text
我希望它能提高某些产品的价格,但它什么也不打印
网址为https://www.weholiday.co.uk/travelreq.php?cd4504d8-b2a2-11e9-8114-3ca82a238f71