selenium间歇性报错:Exception managing chrome: error sending request for url
最近更新了一不小心更新了selenium4.15.2,导致每次运行它都会主动去国外官网请求一遍,因为访问不了国外网址,就加载特别慢
最后报错 Exception managing chrome: error sending request for url (https://chromedriver.storage.googleapis.com/index.html),然后再运行,一开始以为是webdriver版本和chrome版本不对,网上也没有搜到相关问题,找了好久都没解决。最后卸载最新版,替换清华镜像4.5.0才解决了
解决
# 卸载selenium
pip uninstall selenium
# 安装清华镜像 selenium
pip install selenium==4.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/
原文链接:https://blog.csdn.net/weixin_42277380/article/details/134326299