解决方式
- 检查谷歌浏览器版本

- 下载对应版本的chromedriver
下载链接:http://chromedriver.storage.googleapis.com/index.html - 这一步是可选操作,本人就把驱动文件放到chrome的安装目录中

- 指定“executable_path”:
from selenium import webdriver
driver=webdriver.Chrome(executable_path ="C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe")
driver.get("https://www.baidu.com")
- 执行python文件结果:

2083



被折叠的 条评论
为什么被折叠?



