美文网首页我爱编程
python 爬虫 :selenium 环境搭建

python 爬虫 :selenium 环境搭建

作者: seelingzheng | 来源:发表于2017-12-26 00:08 被阅读56次

python环境是基于anaconda搭建的3.6基础之上,操作系统的是mac

  • 模块和驱动安装
pip install selenium  #安装selenium 模块
conda install phantomjs #安装phantomjs驱动
# cd /usr/local/bin
# open . 

拷贝下载的文件到当前打开的文件夹下

#执行代码
from selenium import webdriver 
browser = webdriver.Chrome()
#弹出chrome浏览器

更多内容,欢迎关注公众号


seeling_GIS

相关文章

网友评论

    本文标题:python 爬虫 :selenium 环境搭建

    本文链接:https://www.haomeiwen.com/subject/sgorgxtx.html