Selenium模块的安装
Selenium模块
1.安装selenium
- python2:pip install selenium
- python3:pip install selenium
2.设置浏览器驱动
解压后必须与浏览器的exe放置于同一文件夹中
Google Chrome 稳定版 离线安装包 官方本地下载地址:
Google Chrome v75.0.3770.90 无更新功能版 64位
SHA1:4BD8278A9D89D3790F201D4EDA02D31B2F9886FB
SHA256:B578B4E4E186505D5D3E156857BBDF72B19C01BAF50651A5C33544D75BA36824
http://dl.google.com/release2/chrome/XAlboe3DWkM_75.0.3770.90/75.0.3770.90_chrome_installer.exe
https://dl.google.com/release2/chrome/XAlboe3DWkM_75.0.3770.90/75.0.3770.90_chrome_installer.exe
http://www.google.com/dl/release2/chrome/XAlboe3DWkM_75.0.3770.90/75.0.3770.90_chrome_installer.exe
https://www.google.com/dl/release2/chrome/XAlboe3DWkM_75.0.3770.90/75.0.3770.90_chrome_installer.exe
Google Chrome v75.0.3770.90 无更新功能版 32位
SHA1:BA586E1DB8806375AB5FB1844D2A8FAA10993FAC
SHA256:C3DFE179F2EC20266CEB8AF98EBBB19C884952062EEA0A913821A48C645642DD
http://dl.google.com/release2/chrome/AN_q_RfOOOCt_75.0.3770.90/75.0.3770.90_chrome_installer.exe
https://dl.google.com/release2/chrome/AN_q_RfOOOCt_75.0.3770.90/75.0.3770.90_chrome_installer.exe
http://www.google.com/dl/release2/chrome/AN_q_RfOOOCt_75.0.3770.90/75.0.3770.90_chrome_installer.exe
Google Chrome v75.0.3770.90 Mac版
SHA1:37182A996912013F3796681E2F604B31CBC685FC
SHA256:5AEED86A65C110132DD32EEBC5D5D79C68538973BE2EFFA55C382E00DCE1898D
http://dl.google.com/release2/chrome/IpECbnDgvT8_75.0.3770.90/GoogleChrome-75.0.3770.90.dmg
https://dl.google.com/release2/chrome/IpECbnDgvT8_75.0.3770.90/GoogleChrome-75.0.3770.90.dmg
http://www.google.com/dl/release2/chrome/IpECbnDgvT8_75.0.3770.90/GoogleChrome-75.0.3770.90.dmg
https://www.google.com/dl/release2/chrome/IpECbnDgvT8_75.0.3770.90/GoogleChrome-75.0.3770.90.dmg
Google Chrome 官方带更新功能版 网盘:
https://www.lanzous.com/b138066
Google Chrome v75.0.3770.90驱动:https://chromedriver.storage.googleapis.com/index.html?path=75.0.3770.90/
3.碰到的问题
- Chrome 浏览器默认安装c盘,会因为权限不够没法进行访问,这时候我们需要把整个文件夹移出C盘
- 驱动必须和浏览器版本匹配且位置放置于浏览器exe文件的同目录下