![](https://img-blog.csdnimg.cn/e7ef6dc3cd7547ed9905ae5f95b84900.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
python与爬虫
文章平均质量分 81
python与爬虫
昊虹AI笔记
我的每一篇文章末尾都有我的个人网站名片~
展开
-
用python抓取糗事百科的小程序
直接上代码和运行结果#by suwenhao#QQ 2487872782import urllibimport urllib2import repage = 1url = 'http://www.qiushibaike.com/hot/page/' + str(page)user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windo原创 2016-08-27 09:51:24 · 1352 阅读 · 0 评论 -
python库requests的安装、测试、入门资料、官方资料
python库requests的安装、测试、入门资料、官方资料原创 2016-08-25 16:24:18 · 4074 阅读 · 0 评论 -
requests不容易注意到的细节收集~
1我们可以用r.status_code来检查网页的状态码。>>>r = requests.get('http://www.mengtiankong.com')>>>r.status_code200>>>r = requests.get('http://www.mengtiankong.com/123123/')>>...原创 2016-08-25 16:44:06 · 1359 阅读 · 0 评论