![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
编码的三叔
坚持是一种信仰。
展开
-
python3 sipder 01
简单实现一个获取网页 #coding:utf-8 from urllib import request if __name__=='__main__': response = request.urlopen('http://www.csdn.net') html=response.read() print(html) 获取网页编码 #coding:utf-8 from urllib im...原创 2018-11-09 00:23:52 · 132 阅读 · 0 评论 -
python3 spider 02 获取html的url、 head、 status
#coding:utf-8 from urllib import request import chardet if __name__=='__main__': req = request.Request('http://www.csdn.net') response = request.urlopen(req) #读取url信息 url = response.geturl(); pr...原创 2018-11-09 00:46:40 · 307 阅读 · 0 评论