mac python selenium Chromedriver配置

安裝selenium pip install selenium 

下載Chromedriver http://npm.taobao.org/mirrors/chromedriver/

將Chromedriver放在/usr/local/bin 

最終代碼
from selenium import webdriver
import time

driver = webdriver.Chrome()
driver.get("http://www.baidu.com")
time.sleep(3)
driver.quit()
相關文章
相關標籤/搜索