selenium 开始使用时出现的坑
chrome 80.0.3987.116时按以前的用法时出现的错误
1.程序先从 selenium 引入 webdriver,引入 chrome 程序的选择项目 Options:
老版本可用:from selenium.webdriver.driver.options import Options
但是在chrome 80.0.3987.116时报错
需要调整为:from selenium.webdriver.chrome.options import Options
2.程序可以正常运行但出现以下错误
DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome(chrome_options=chrome_options)
以上错误只提示警告信息但不影响运行
需要将“chrome_options”改成“options”即可,此问题应该在最近的版本更改的,我使用的是selenium==3.141.0,有兴趣的话可以去看官方文档进行确定那个版本