转载

解决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了

文章最后发布于: 2019-01-09 12:03:37

解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P的更多相关文章

  1. 解决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 ...

  2. 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 ...

  3. python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...

  4. 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(" ...

  5. 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 下载后拷贝到 ...

  6. 解决selenium.common.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path

    'chromedriver' executable needs to be in Path 声明:本人萌新,刚学python不久记录一下自己的坑,发出来若能帮助到一些人尽早解决问题那便是极好的,( ̄▽ ...

  7. selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.

    解决办法: 把chromedriver exe文件放到python scripts目录下

  8. python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下

  9. 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位系统 ...

随机推荐

  1. Spring和SpringMVC总结篇

    作者:肥宅兜链接:https://www.cnblogs.com/doudouxiaoye/p/5693399.html 1.为什么使用Spring ? 方便解耦,简化开发;通过Spring提供的Io ...

  2. 使用kubernetes管理包的常用命令

    常用命令是: ## 获取指定命名空间(rubikt)下所有的部署的服务 kubectl.exe get deployments --namespace rubikt ## 获取制定命名空间(rubik ...

  3. [BZ1925] [SDOI2010]地精部落

    [BZ1925] [SDOI2010]地精部落 传送门 一道很有意思的DP题. 我们发现因为很难考虑每个排列中的数是否使用过,所以我们想到只维护相对关系. 当我们考虑新的一个位置时,给新的位置的数分配 ...

  4. Gamma阶段第六次scrum meeting

    每日任务内容 队员 昨日完成任务 明日要完成的任务 张圆宁 #91 用户体验与优化https://github.com/rRetr0Git/rateMyCourse/issues/91(持续完成) # ...

  5. stop容器,把信号量传给java进程,优雅退出

    Java中可以添加ShutdownHook监听关闭事件,包括kill -15, control+c,terminal等信号.kill -9则接收不到. Runtime.getRuntime().add ...

  6. RPA系列之(二)-UIPath学习目录

    如何一步步渐入佳境,跟着目录一点一点来 UiPath简介 UiPath下载安装与激活 UiPath第一个案例Hello World UiPath变量的介绍和使用-1 UiPath变量的介绍和使用-2 ...

  7. Expect Command And How To Automate Shell Scripts Like Magic

    In the previous post, we talked about writing practical shell scripts and we saw how it is easy to w ...

  8. PHP重命名文件夹下的文件后缀名

    PHP重命名文件夹下的文件后缀名<pre> public function zhuanhouzuiming(){ $lujings='upload/'; $filesnames = sca ...

  9. hanlp添加词典不起作用

    不起作用的原因很多,这里列举几个 这里的hanlp我虽然用的maven建立的但是要添加自定义词典,所以没有用maven引入的方式,而是下载了data+hanlp.jar文件          data ...

  10. Java8 新特性 方法引用

    什么是方法引用   方法引用可以被看作仅仅调用特定方法的Lamdba表达式的一种快捷方式.比如说Lamdba代表的只是直接调用这个方法,最好还是用名称来调用它,可不用用对象.方法名(),方法引用,引用 ...