zoukankan      html  css  js  c++  java
  • 解决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了

    文章最后发布于: 2019-01-09 12:03:37
  • 相关阅读:
    路面修整
    路由器安置
    高维网络
    SRETAN
    对象、数组 深度复制,支持对象嵌套数组、数组嵌套对象
    仿 window对象 confirm方法
    仿 window对象 alert 方法
    饼状图
    柱状图
    树状图
  • 原文地址:https://www.cnblogs.com/php-linux/p/11861686.html
Copyright © 2011-2022 走看看