![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python爬虫
凉拌豆腐干
这个作者很懒,什么都没留下…
展开
-
Python爬虫之网络代理
Python爬虫Ip代理1.注册网络代理IP2.在项目中获取代理proxy_address=ur.urlopen('http://api.ip.data5u.com/dynamic/get.html?order=3fae62193cd99e193417e4c4a53801d9&sep=4').read().decode('utf-8').strip()#创建proxy_handle...原创 2020-02-15 20:22:16 · 184 阅读 · 0 评论 -
python之urlib框架的使用
Urlib框架的使用使用urllib加载网页 #导入urlib.request包 import urlib.request as ur ret = ur.urlopen('https://www.baidu.com').read() print(ret) with open('edu.html','wb') as f: f.write(ret)Get请求与url编码...原创 2020-02-15 13:52:44 · 270 阅读 · 0 评论 -
Http协议详解
HTTP协议详解关键字说明Request URL请求的URL地址Request Method请求方法Status Code状态码Remote Address远端地址Connection连接类型Content-Encoding数据压缩方式Content-Type互联网媒体类型Accept发送端希望接受的数据类型Ac...原创 2020-02-14 13:34:48 · 106 阅读 · 0 评论 -
Python爬虫(一)-数据清洗与提取
re模块的使用提取,匹配,替换提取:findall()匹配:match()替换 :sub()例子:#sub("正则表达式",'替换的字符','需要替换的字符') html=re.sub('\n','',html)#findall("正则表达式","要替换的字符") ret=re.findall(pattern_1,html)#match("正则表达式","匹配的字符...原创 2020-02-14 13:23:55 · 2027 阅读 · 0 评论