Selenium 中的Google(谷歌浏览器)最新版本chromedriver
文章目录
- [Selenium 中的Google(谷歌浏览器)最新版本chromedriver](#Selenium 中的Google(谷歌浏览器)最新版本chromedriver)
1.当前作者的谷歌浏览器版本
当前本人的谷歌浏览器版本为116.0.5845.180

当我使用python + Selenium 进行数据采集的时候发现抱错,报错的内容为

c
This version of ChromeDriver only supports Chrome version xxx
说明当前我的谷歌浏览器驱动版本过低,不兼容了。
2.当前驱动官网的最新版本
当出现版本过低的错误时,第一个办法是去官网或者淘宝镜像找到最新的驱动,下载更新。
打开网址发现最新的版本停止在了114版本。

3.当不想降低浏览器版本继续使用谷歌浏览器的办法
降低浏览器版本处理不好会导致一些密码、网址、登录的cookies、设置好的主题丢失,很不方便。而且降低浏览器版本也不是随意的,只有固定的几个版本可以回退。所以我选择寻找最新的驱动。
当前网上没有人发布最新版本的驱动,但是通过一些努力我还是找到了最新116版本的谷歌浏览器驱动。

运行代码,成功运行
python
from selenium import webdriver
driver = webdriver.Chrome()
# 设置隐式等待
driver.implicitly_wait(4)
# 发起请求
driver.get("http://www.baidu.com/")


需要驱动的私信我吧!
