'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.exception.WebDriverException:Message:'chromedriver' executable needs to be in Path的更多相关文章

  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.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in P

    转载 解决selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be i ...

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

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

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

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

  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. CMake命令之list

    用途:提供一些列表操作 list(LENGTH <list><output variable>)  list(GET <list> <elementindex ...

  2. absolute属性与IE6/IE7之间的误会

    三.absolute属性与IE6/IE7之间的误会 absolute属性确实存在不少兼容性的问题,首先absolute属性定位相关(left/top)的些bug(例如IE6的奇偶bug)这里不予以讨论 ...

  3. DebugView 使用

    最近遇到带加密狗的工程项目,无法使用控制台调试,尝试使用DebugView进行辅助调试. DebugView是一个系统调试信息输出的捕获工具,可以捕获程序中由TRACE(debug版本)和Output ...

  4. shell初级-----数据呈现方式

    输入与输出 Linux系统将每个对象当作文件处理,这包括输入和输出进程.Linux用文件描述符来标识每个文件对象.文件描述符是一个非负整数,可以唯一标识会话中打开的文件.每个进程一次多可以有九个文件描 ...

  5. android内存溢出 java.lang.OutOfMemoryError

    今天在做ListView 的时候.想做一个音乐列表模块,前面是图片,后面是分类名称,如下图: 结果运行时候,LogCat是总是报 java.lang.OutOfMemoryError的错误,顾名思义, ...

  6. SSM报错:No converter found for return value of type: class java.util.ArrayList at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverter

    我使用的是SSM框架,是在编写测试RESTFUL接口的时候出现, @RequestMapping(value = "/selectAll", method = RequestMet ...

  7. iOS Testing with Xcode 阅读笔记

    官方文档直通车 Performance Testing A baseline is a combination of the average time performance in ten runs ...

  8. python中的栈

    # @File: stack # 列表实现栈 class MyStack(object): def __init__(self): self.data = [] def push(self, item ...

  9. [LuoGu]P2664 树上游戏

    Portal 这题真的好. 看到树上路径, 脑子里就要点分治 这一题对于每个点都要计算一遍, 如果暴算实在不好算, 这样我们就可以考虑算贡献. 直接计算每种颜色的贡献. 因为一条过重心的路径中, 可能 ...

  10. magento优化之模板静态化

    最近首页很慢,运行magento profile检查的时候,发现首页某个templat运行时间占了一半,大概6s. 用magento自带的缓存,尝试把代码中的collection缓存起来,但不知道为啥 ...