解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P
解决 to in 39 be selenium message
2023-09-14 09:12:12 时间
转载
解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P
'chromedriver' executable needs to be in Path
声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ̄)"
在进行爬虫爬取淘宝商品信息时候,利用selenium来模拟浏览器进行爬取时遇到了这个问题:
selenium.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path
详细如下图所示:
这一错误是因为没有配置好chromedriver,怎么配置呢?(我用的是chrome)
1.打开chrome 输入 “chrome://version/”来查看chrome版本 如图我的是63
2.访问此网站 http://chromedriver.storage.googleapis.com/index.html 然后选择合适版本的driver
比如
点击notes.txt就可查看其对应的版本号,如下:
如果符合就可以下载了,下载到自己指定位置然后就可以进行配置了
3. 配置如下:
(具体路径根据自己下载保存的位置而定)
4.这时候运行基本就可以成功了!
不过很不幸,我第一次瞎下的driver版本不对,所以就GG了抛出了如下错误 ConnectionResetError:主机强迫关闭了一个现有连接
于是乎重新下了一个匹配的driver版本然后ok了
相关文章
- 解决JAVA调用C++ DLL文件Unable to load library的问题
- Bad version number in .class file (unable to load class ***) 解决
- 阿里云注册集群+Prometheus 解决多云容器集群运维痛点
- 解决使用goagent访问twitter提示网站证书不受信任
- 解决因为http_proxy代理导致的git clone失败的问题:OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to xxx:443
- Matlab:成功解决In an assignment A(I)=B,the number of elements in B and I must be the same
- 成功解决Fatal error in launcher: Unable to create process using ‘“f:program filespythonpython36pytho
- 成功解决No handles with labels found to put in legend.
- 成功解决ValueError: Could not interpret input day
- 成功解决ImportError: [joblib] Attempting to do parallel computing without protecting your import on a sy
- 成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
- 成功解决ERROR: Unable to find the development tool `make` in your path; please make sure that you have t
- 成功解决ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device
- 已解决E: Unable to locate package ros-kinetic-desktop-full
- 已解决WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is bein
- 已解决[1964] Failed to execute script ‘VRrify_code’ due to unhandled exception
- 已解决Resource averaged_perceptron_tagger not found. Please use the NLTK Downloader to obtain the resou
- 已解决SQL_ERROR_INFO: “You have an error in your SQL syntax; check the manual that corresponds to your
- 全网多种方法解决You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
- K8S集群Token过期处理方法以及Kubectl命令无法使用的问题解决
- K8S 证书过期,报错:Unable to connect to the server: x509: certificate has expired or is not yet valid 解决方法