环境安装

1.安装selenium

  命令行安装:pip install selenium

2.安装chrome浏览器和chromedriver下载

  chrome浏览器自行下载

  chromedriver下载地址:https://registry.npmmirror.com/binary.html?path=chromedriver/

  

  注意,chromedriver下载的版本要和chrome浏览器版本匹配,不然运行会报错

  [selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 101Current browser version is 103.0.5060.53 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome]

  查看当前浏览器版本

   

3.chromedriver下载后放在python的安装根目录下面

 

 

 

 

 

 

 

posted @ 2022-07-07 11:34  Lucky-qq  阅读(481)  评论(0编辑  收藏  举报