数据采集的流程
Http请求库,requests、urllib3、pycurl
Html解析库,xpath、bs4、pyquery、re
数据持久化,io、pymysql、pymongo

入口函数->参数构造器->文件缓存区->http请求器->编码处理器->文本处理器
入口函数:mian func
参数构造器:接受自定义类型参数转为请求参数,Fiddler文本转headers
文件缓存区:对请求url、参数进行文件缓存,降低重复提交导致的反爬虫
http请求器:get、post
编码处理器:通过response headers与response html meta对文本自动编码
文本处理器:快速将文本进行io、bs4、xpath处理

参数

url:请求地址,数组时为拼接get
data:post字典
cookie:headers cookie
ip:高匿代理
timeout:超时时间
headers:headers文本、字典、fiddler文本
encode:强制编码
redect:时候301、302重定向
timetry:错误尝试次数
files:post上传文件
session:session持久化
prce:请求文本预处理
ex:请求文本解析器
tail:请求文本后处理
rw:重定向写出文件
cache:缓存机制

ps:自动生成ua,有ua时不添加