【发布时间】:2021-04-29 11:39:18
【问题描述】:
我尝试了各种方法,包括通过完整的 xpath 搜索和通过类查找,然后通过 a 标签搜索 href。我已经做了好几个小时了,但我似乎无法理解。任何帮助将不胜感激。
from selenium import webdriver
import time
namelist=[]
driver=webdriver.Chrome()
driver.get("https://waxpeer.com/")
time.sleep(15)
当我使用 .text 时它不起作用
search=driver.find_elements_by_xpath('//*[@id="container"]/div/div/a')
print(search)
namelist.append(search)
【问题讨论】:
标签: python web-scraping beautifulsoup python-requests