Selenium模塊的安裝

Selenium模塊

1.安裝selenium

  • python2:pip install selenium
  • python3:pip install selenium

2.設置瀏覽器驅動

解壓後必須與瀏覽器的exe放置於同一文件夾中html

瀏覽器 驅動
Chrome: https://sites.google.com/a/chromium.org/chromedriver/downloads
Edge: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Firefox: https://github.com/mozilla/geckodriver/releases
Safari: https://webkit.org/blog/6900/webdriver-support-in-safari-10/

Google Chrome 穩定版 離線安裝包 官方本地下載地址:python

Google Chrome v75.0.3770.90 無更新功能版 64位git

SHA1:4BD8278A9D89D3790F201D4EDA02D31B2F9886FBgithub

SHA256:B578B4E4E186505D5D3E156857BBDF72B19C01BAF50651A5C33544D75BA36824web

http://dl.google.com/release2/chrome/XAlboe3DWkM_75.0.3770.90/75.0.3770.90_chrome_installer.exechrome

https://dl.google.com/release2/chrome/XAlboe3DWkM_75.0.3770.90/75.0.3770.90_chrome_installer.exeapi

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.exegoogle

http://redirector.gvt1.com/edgedl/release2/chrome/XAlboe3DWkM_75.0.3770.90/75.0.3770.90_chrome_installer.execode

https://redirector.gvt1.com/edgedl/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

https://www.google.com/dl/release2/chrome/AN_q_RfOOOCt_75.0.3770.90/75.0.3770.90_chrome_installer.exe

http://redirector.gvt1.com/edgedl/release2/chrome/AN_q_RfOOOCt_75.0.3770.90/75.0.3770.90_chrome_installer.exe

https://redirector.gvt1.com/edgedl/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

http://redirector.gvt1.com/edgedl/release2/chrome/IpECbnDgvT8_75.0.3770.90/GoogleChrome-75.0.3770.90.dmg

https://redirector.gvt1.com/edgedl/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文件的同目錄下
相關文章
相關標籤/搜索