Mac Os
1.pip install selenium
2.安装node.js(百度到官网下载最新版本)
3.使用node.js安装PhantomJS(npm install phantomjs -g)
4.下载chromedriver.
from selenium import webdriver
browser = webdriver.Chrome()
WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
使用webdriver的时候,会报错,就算chrome的path传入,依然会报错。
下载chromedriver,将其拷贝至/usr/local/bin就可以解决
chromedriver版本参考http://blog.csdn.net/huilan_same/article/details/51896672
参考https://sites.google.com/a/chromium.org/chromedriver/getting-started。