1,请求:requests
requests.get(url, headers)
requests.post(url, data=data, files=files)
urllib模块:
Python2
import urllib2
response = urllib2.urlopen('http://www.baidu.com');
Python3
import urllib.request
response =urllib.request.urlopen('http://www.baidu.com');
2,解析:
lxml (解析网页)
from lxml import etree
# 获取请求网页数据
html = etree.HTML(text)
3,存储:
mongodb数据库
mysql数据库
redis数据库
4,工具:
selenium自动化工具
5,框架:
scrapy和scrapy-redis