selenium+phantomjs自动化爬取

1.pip install selenium

2.下载phantomjs-2.1.1-windows

3.解压phantomjs后配置文件夹的bin文件夹的环境变量

4.下载Chromedriver32版本的exe文件放到Python安装目录下


5.编写代码测验

from seleniumimport webdriver

browser = webdriver.Chrome()

browser.get('http://www.baidu.com/')

你可能感兴趣的:(selenium+phantomjs自动化爬取)