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()

  

猜你喜欢

转载自www.cnblogs.com/django-start/p/9692028.html