错误信息:selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
启动浏览器时报错:selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
self.driver = webdrvier.Chrome()
经过排查发现是由于:chromedriver驱动程序放置路径不对导致的。
解决方案:
找到Python安装路径(一般都是在:/Library/Frameworks/Python.framework/Versions/3.8)
将驱动程序放在"bin"目录下即可
Chromedriver驱动链接:http://npm.taobao.org/mirrors/chromedriver/
(注意:一定要保持驱动版本和Google Chrome浏览器版本一致,否则会出现无法打开浏览器的问题。且需要将Google Chrome浏览器的自更新关闭)
白嫖不好,创作不易,各位的点赞就是创作的最大动力。 持续更新,未完待续……