- 调用
from selenium import webdriver
模块是,谷歌浏览器报错os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home ```python
- 解决办法:
https://stackoverflow.com/questions/40555930/selenium-chromedriver-executable-needs-to-be-in-path 您可以在此处下载ChromeDriver:https: //sites.google.com/a/chromium.org/chromedriver/downloads 那你有多个选择: 将其添加到您的系统中 path 把它放在与python脚本相同的目录中 直接指定位置 executable_path driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')
持续记录中…