phantomJS浏览器

无界面浏览器

下载解压缩

http://phantomjs.org/download.html

selenium调用

from selenium import webdriver
import time
driver=webdriver.PhantomJS(executable_path='D:\\tool\\phantomjs-2.1.1-windows\\bin\\phantomjs')
driver.get("http://baidu.com")
time.sleep(2)
print driver.title
driver.close()

 

posted @ 2018-02-27 15:18  米 立  阅读(412)  评论(0编辑  收藏  举报