
Python爬虫
凉拌豆腐干
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python爬虫之网络代理
Python爬虫Ip代理 1.注册网络代理IP 2.在项目中获取代理 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 · 321 阅读 · 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 · 307 阅读 · 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 · 165 阅读 · 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 · 2090 阅读 · 0 评论