PY爬虫开发利器
来源:互联网 发布:多益网络工资怎么样 编辑:程序博客网 时间:2024/06/02 22:51
一.模块
爬虫的主要模块是三个:请求、解析、储存。这里介绍一下我们项目常用的模块。
1. 请求
requests(第三方模块):Requests: HTTP for Humans
对HTTP协议进行高度封装的库,比系统自带的urllib系列的库好用很多。2、3兼容的库。
更多介绍:http://xlzd.me/2015/12/11/requests
2. 解析:
bs4(即beautifulsoup,第三方模块):https://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/
解析HTML的神器。比正则好用很多。2、3兼容的库。
3. 储存:
csv(系统模块):https://docs.python.org/2/library/csv.html
把数据写成csv格式。
pymongo(第三方模块):https://api.mongodb.com/python/current/
把数据写入MongoDB(https://www.mongodb.com/)
MySQL-python(第三方模块):https://pypi.python.org/pypi/MySQL-python/1.2.4
把数据写入MySQL里面。
4. 并发(主要是为了提高效率)
主要是三个:协程、线程、进程
(1)协程:gevent(第三方模块)http://www.gevent.org/
(2)线程:threading(系统模块)https://docs.python.org/2/library/threading.html
(3)进程:multiprocessing(系统模块)https://docs.python.org/2/library/multiprocessing.html
二.框架
- PY爬虫开发利器
- PY爬虫Demo集合
- PY 爬虫 Urllib2
- python_慕课\Python开发简单爬虫\5-3 Python爬虫urlib2实例代码.py
- 爬虫利器:Selenium+PhantomJS
- 爬虫利器之PhantomJS
- python爬虫利器-bs
- 开发利器
- 零基础写py爬虫
- PY爬虫专用导航贴
- 爬虫常用middlewares.py文件
- python_慕课\Python开发简单爬虫\7-7 开始运行爬虫和爬取结果展.py
- Python爬虫利器requests详解
- Python爬虫利器Beautiful Soup
- Python爬虫利器:BeautifulSoup库
- Python爬虫利器系列文章
- python爬虫利器-request库
- python爬虫利器-xpath使用
- ios 对于修改navigationItem的颜色和系统自带的navigationItem的rightBarButtonItem的颜色的问题
- C构造Lua表
- 数据库连接池的工作原理
- android ontouch onclick
- python socket(二)接收多个消息
- PY爬虫开发利器
- Web——开发环境搭建
- JAVA中的字节流和字符流的转换
- poj 2441 状压dp
- filezilla server interface 的自启动
- 拿走不谢!268条PCB Layout设计规范全收录
- Mac OS X取消Apache(httpd)开机启动
- listview控件使用实例(一)
- 骨折整理文档