刚刚开始学习Python爬虫,在 Python 下引用 Selenium 包开发时, WebDriver甩出了一个错误消息然后就中断了,错误消息:
WebDriverException: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
在环境变量中配置PATH,不成功,在网上搜索了很多解决方法都没有效果,只能手动#手动添加路径,最终解决方案:
1)查看下载的chrome浏览器版本
方法:在chrome浏览器中打开:chrome://version
2)找到相应版本的chromedriver
- 官方网站:https://sites.google.com/a/chromium.org/chromedriver
- 下载地址:https://chromedriver.storage.googleapis.com/index.html
打开官方网站,查看相应的