使用selenium创建browser就开始报错,错误原因是没有chrome驱动
解决方法:
- 下载对应版本的chromedriver,下载地址为(http://chromedriver.storage.googleapis.com/index.html),下载后得到压缩包,解压得到 chromedriver.exe 文件
- 将exe文件复制到谷歌浏览器目录(如 C:\Program Files (x86)\Google\Chrome\Application),在此目录中新建文件夹chromedriver,将此文件夹添加至环境变量
- 将exe文件复制到python根目录
参考:https://blog.csdn.net/weixin_37185329/article/details/80493281