windows32 plinter chrome 浏覽器
1.首先需要安裝splinter
2.調用函數
from splinterbrowser import Browser
3.Browser()
這裡會報錯,因為Browser會預設浏覽器為火狐
#WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
正确收入方式為Browser(“chrome”)
4.下載下傳chromedriver 驅動。
http://npm.taobao.org/mirrors/chromedriver/ #這個連結應該能夠正常;下載下傳2.35版本試了一下,更新時間為近期的
http://chromedriver.storage.googleapis.com/index.html #這裡需要檢視一下 更新時間 為你檔案夾重的時間。因為我在下載下傳過程中,無論下載下傳哪個檔案都會下載下傳2.21版本。是以被迫降低chrome浏覽器版本
https://sites.google.com/a/chromium.org/chromedriver/downloads #打不開
5.完成複制 至Python 根目錄 就可以了