解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P
解决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了
解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P的更多相关文章
- 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
解决方案: 1.查看浏览器当前版本:chrome://version/. 2.到https://sites.google.com/a/chromium.org/chromedriver/downloa ...
- selenium使用遇到的问题(selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.)
1.安装pip3 install selenium 2.使用browser=webdriver.Chrome()时报错 :selenium.common.exceptions.WebDriverExc ...
- python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...
- mac-webui-selenium下的webdriver selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
from selenium import webdriver def test1(): url='http://www.baidu.com' driver=webdriver.Chrome(" ...
- centos7 selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
1.查看安装的chrome浏览器版本 2.查看版本对应的驱动 https://sites.google.com/a/chromium.org/chromedriver/downloads 下载后拷贝到 ...
- 解决selenium.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path
'chromedriver' executable needs to be in Path 声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ...
- selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
解决办法: 把chromedriver exe文件放到python scripts目录下
- python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下
- Path通过Selenium模拟浏览器抓取,Windows 64解决selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.方法
1.下载geckodriver.exe: 下载地址:https://github.com/mozilla/geckodriver/releases请根据系统版本选择下载:(如Windows 64位系统 ...
随机推荐
- Java多态中成员的调用的特殊情况
1.当子类和父类中有相同的成员属性的时候 public class Demo { public static void main(String[] args) { Father son=new Son ...
- django运行报错TypeError: object supporting the buffer API required
运行django项目报错:TypeError: object supporting the buffer API required 解决方案: 将settings.py中数据库的密码改成字符串格式 源 ...
- Luogu P3228 HNOI2013 数列 组合数学
题面 看了题解的推导发现其实并不复杂,但是如果你想要用多项式或者组合数求解的话,就GG了 其实如果把式子列出来的话,不需要怎么推导就能算出来,关键是要想到这个巧妙的式子. 设\(b_i=a_{i+1} ...
- python爬虫实例——爬取歌单
学习自<<从零开始学python网络爬虫>> 爬取酷狗歌单,保存入csv文件 直接上源代码:(含注释) import requests #用于请求网页获取网页数据 from b ...
- ZROI1119 【十一·联考】幸福
ZROI1119 [十一·联考]幸福 传送门 一道矩阵快速幂. #include<iostream> #include<cstdio> #include<algorith ...
- Unable to resolve service for type 'Microsoft.AspNetCore.ResponseCompression.IResponseCompressionProvider' while attempting to activate 'Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMid
System.InvalidOperationException HResult=0x80131509 Message=Unable to resolve service for type 'Micr ...
- winform自定义分页控件
1.控件代码: public partial class PagerControl : UserControl { #region 构造函数 public PagerControl() { Initi ...
- Spring boot2X集成zuul与consul实现负载均衡和反向代理
zuul 是netflix开源的一个API Gateway 服务器 所有从设备或网站来的请求都会经过Zuul到达后端的Netflix应用程序. 作为一个边界性质的应用程序,Zuul提供了动态路由.监控 ...
- LRU缓存简单实现
缓存接口定义 /** * 缓存接口 * * @author zhi * */ public interface ICache<K, V> { /** * 添加缓存数据 * * @param ...
- 技嘉Z390 AORUS MASTER+酷睿I9超频5.0GHz教程
注:调整每项值的时候,需要手动用键盘输入数字,按回车确定.(只按回车并不会出现选择项) Core i9-9900K也出来了一段时间了,这个号称“地表最强游戏U”也成了很多人最新的目标.网上也有大佬表示 ...