解决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位系统 ...
随机推荐
- docker nginx 命令。
docker run -d -p 80:80 -p 443:443 --name baiqian.site --restart=always -v ~/wwwroot/layx:/usr/share/ ...
- 这里有一个url=https://www/.baidu.com/s?id=111&name=yourname,写一个函数获取query的参数和值存放在一个对象
console.log(getJson(url)); function getJson(url){ var obj={}; var arr=url.split("?")[1].sp ...
- 优先队列优化的 Huffman树 建立
如果用vector实现,在运行时遍历寻找最小的两个节点,时间复杂度为O(N^2) 但是我们可以用priority_queue优化,达到O(N logN)的时间复杂度 需要注意的是priority_qu ...
- PID optimizer
如何评价PID optimizer? 论文链接:http://www4.comp.polyu.edu.hk/~cslzhang/paper/CVPR18_PID.pdf作者github:https:/ ...
- Linux搭建Nexus3.X构建maven私服
备注:linux版本: ubuntu 同时已经部署好JDK8环境 一.linux安装nexus 1.创建文件夹并进入该目录 cd /usr/local && mkdir nexus & ...
- 【06月05日】A股滚动市净率PB历史新低排名
2010年01月01日 到 2019年06月05日 之间,滚动市净率历史新低排名. 上市三年以上的公司,2019年06月05日市净率在30以下的公司. 来源:A股滚动市净率(PB)历史新低排名. 1 ...
- 【Python开发】anaconda3 安装python包
环境说明 电脑配置:win7 64位 安装版本:anaconda3 Python 3.6 参考链接 http://python.jobbole.com/86236/ (链接中有一个小点介绍了如何加速包 ...
- cad.net 获取所有已经安装的cad版本信息
计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\Hardcopy var ackey = Registry.LocalMachine.OpenSubKey(@&quo ...
- 爬取'Content-Type': 'text/plain;charset=UTF-8' ,发送请求数据方式
解决方式 直接以字符串的方式发送data就可以得到响应数据 import requests data = 'k1:v1,k2:v2' requests.post(url, data=data)
- asbDio (asbDio.dll)
using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices ...