from selenium  import  webdriver
from  selenium.webdriver.chrome.options  import Options
#实现无头浏览器
chrome_options=Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")



driver=webdriver.Chrome(options=chrome_options)
driver.get("http://quotes.toscrape.com/")
a=driver.find_elements_by_xpath('//span[@class="text"]')
for i in a:
    print(i.text)

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-06-12
相关资源
相似解决方案