selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

   最近在学习python爬虫时,使用selenium中webdriver类报错如题。

   经过网上经验和自己的摸索,终于找到了解决方法。

   这里使用的是Chrome,可以先打开Chrome,网址搜索栏搜索Chrome://version,查看自己的Chrome版本。

 

 

   查看到自己Chrome版本之后,输入网址:http://chromedriver.storage.googleapis.com/index.html?path=75.0.3770.140/

   找到自己Chrome版本对应的drive,在notes.txt中可查看当前driver所支持的版本号

 找到和自己Chrome版本对应的driver版本之后,直接下载,下载完之后,必须解压到当前python路径下才能使用。

 

 

亲测有效

 

posted @ 2019-08-08 19:57  zx1  阅读(186)  评论(0编辑  收藏  举报