'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. 「LuoguP4779」 【模板】单源最短路径(标准版)

    Description 2018 年 7 月 19 日,某位同学在 NOI Day 1 T1 归程 一题里非常熟练地使用了一个广为人知的算法求最短路. 然后呢? 100→60: Ag→Cu: 最终,他 ...

  2. ndoejs后台查询数据库返回的值-进行解析

    JSON.parse(jsonstr); //可以将json字符串转换成json对象 JSON.stringify(jsonobj); //可以将json对象转换成json对符串

  3. ibatis 中 $与#的区别

    ibatis 中 $与#的区别 使用#: select * from table where id = #id# 如果字段为整型:#id#表示成id select * from table where ...

  4. Ruby 全局变量,实例变量,类变量

    class Computer $manufacturer = "Mango Computer, Inc." # “$" 是全局变量关键字 @@num_of_instanc ...

  5. CoreBluetooth Central模式 Swift版

    也是醉了,CB这个API到现在也没有Swift的文档.最新的文档还是3年前还是4年前的OC版的,被雷的外焦里嫩的.自己一点一点写成Swift还各种报错,最坑的是这些错误压根找不到解决方案.索性自己做个 ...

  6. 更新gitignore

    更新: 2017/04/26  修正windows版本下的命令   git rm -r --cached .       (Windows 下的版本) 更新: 2017/06/06  mac下的命令也 ...

  7. POJ2718【DFS】

    题意: 给你0到9之间的数,然后让你搞成两个数,求一个最小差异值(被组合的数不允许出现前导0) 思路:最小差异那么肯定是有一个整数长n/2,另一个长n-n/2,搜一下就好了. code: #inclu ...

  8. PJzhang:centos7动态IP和静态IP两种方式的设置

    猫宁!!! 参考链接:https://blog.csdn.net/m0_37776094/article/details/81736900 如果centos7只设置静态IP,对于不断切换无线网的情况并 ...

  9. Codeforces Round #510 (Div. 2) A&B By cellur925

    第一次CF祭== 由于太菜了只做了前两题== 因为在第一题上耗费时间太多了,我还是太菜了==. A. Benches time limit per test 1 second memory limit ...

  10. hdu1856 More is better 基础并查集

    #include <cstdio> #include <cstring> #include <algorithm> #include <cstdlib> ...