报错提示:selenium.common.exceptions.WebDriverException: Message: unknown command: session/cb87c62ba884da82528c9785bdc1eb68/goog/cdp/execute
报错原因:chrome 的版本已经升级到了 85, 而 chrome 的版本依然在 37。
常规方法:在 Google 的文件中添加了 85 的 chromedriver.exe,无效。
实际方法:CMD 查询 chromedriver 的位置:where chromedriver, 找到在Python 下的 scripts 文件夹,替换即可。
D:ProgramsPythonPython37Scriptschromedriver.exe;
直接替换后在 CMD 中查询版本信息,chromedriver -V:
ChromeDriver 85.0.4183.87