版权声明:转载请注明作者(独孤尚良dugushangliang)出处:Python的Selenium模块如何找到对应的driver_dugushangliang的博客-CSDN博客
pypi的selenium的地址是:selenium · PyPI,里面提到了不同浏览器对应的下载地址:
注:上面的Chrome对应URL迁移,https://sites.google.com/chromium.org/driver/downloads(2022年1月5日更新)
近几个月停留在114版本,发现最新的118在:https://googlechromelabs.github.io/chrome-for-testing/
(2023年10月14日更新)
下载driver的还有:Downloads | Selenium、http://chromedriver.storage.googleapis.com/index.html、ChromeDriver Mirror等。
本文使用Chrome浏览器,如下图所示,查看版本。
下载相应版本,如下图所示。
下载后,在代码中引用对应路径即可。
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
driver = webdriver.Chrome(executable_path='D:\\chromedriver.exe',options=chrome_options)
独孤尚良dugushangliang——著