Python爬虫学习——使用selenium和phantomjs爬取js动态加载的网页
2017-05-01 15:06
1211 查看
1.安装selenium
2.安装phantomjs
下载地址:http://phantomjs.org/download.html
下载的版本是:phantomjs-2.1.1-linux-x86_64.tar.bz2
解压下载好的文件,并把文件夹移动到/usr/local目录下
在/etc/profile下添加,之后source /etc/profile
测试是否安装成功
pip install selenium Collecting selenium Downloading selenium-3.4.1-py2.py3-none-any.whl (931kB) 100% |████████████████████████████████| 942kB 573kB/s Installing collected packages: selenium Successfully installed selenium-3.4.1
2.安装phantomjs
下载地址:http://phantomjs.org/download.html
下载的版本是:phantomjs-2.1.1-linux-x86_64.tar.bz2
解压下载好的文件,并把文件夹移动到/usr/local目录下
sudo mv phantomjs-2.1.1-linux-x86_64 /usr/local/phantomjs
在/etc/profile下添加,之后source /etc/profile
export PHANTOMJS_HOME=/usr/local/phantomjs export PATH=$PATH:$PHANTOMJS_HOME/bin
测试是否安装成功
phantomjs -v 2.1.1
相关文章推荐
- python获取完整网页内容(即包括js动态加载的):selenium+phantomjs
- Python爬虫(入门+进阶)学习笔记 1-8 使用自动化神器Selenium爬取动态网页(案例三:爬取淘宝商品)
- Python使用Selenium和PhantomJS解析动态JS的网页
- Python使用Selenium和PhantomJS解析动态JS的网页
- [Python爬虫]Scrapy配合Selenium和PhantomJS爬取动态网页
- Python使用Selenium + PhantomJS抓取动态网页:今日头条
- Python爬虫使用Selenium+PhantomJS抓取Ajax和动态HTML内容
- 使用python抓取js动态加载的网页
- python+selenium+PhantomJS爬取网页动态加载内容
- Python爬虫使用Selenium+PhantomJS抓取Ajax和动态HTML内容
- Python爬虫使用Selenium+PhantomJS抓取Ajax和动态HTML内容
- python+selenium+PhantomJS爬取网页动态加载内容
- 小猪的Python学习之旅 —— 5.使用Selenium抓取JavaScript动态生成数据的网页
- 第三百五十节,Python分布式爬虫打造搜索引擎Scrapy精讲—selenium模块是一个python操作浏览器软件的一个模块,可以实现js动态网页请求
- Python爬虫使用Selenium+PhantomJS抓取Ajax和动态HTML内容
- 使用python抓取js动态加载的网页
- 萌新的Python学习日记 - 爬虫无影 - 使用BeautifulSoup + css selector 抓取动态网页内容:Knewone
- Python爬虫学习(9):Selenium的使用
- selenium+phantomjs+js动态网页截图
- 浅谈网络爬虫爬js动态加载网页(一)