![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Web-Scraping
i-kernel
这个作者很懒,什么都没留下…
展开
-
Python3:urllib中urlopen()函数新特点
Python3:urllib中urlopen()函数新特点 2015-06-05 因为用Python2爬网页被编码问题逼疯了,迫不得已用上了Python3,用上Python3才发现真是个新世界,简直太给力了。 Python2的urllib、urllib2在Python3中集合成了urllib模块,这样逻辑清晰了不少。urllib库包含下面几个内容: urllib.request转载 2017-09-24 20:11:58 · 635 阅读 · 0 评论 -
对python文件方法open的探究
对python文件方法open的探究 最近由于工作原因,开始学习python的开发,遇到了一点文件操作的问题,探究一下open函数的使用。 一、open()的函数原型 open(file, mode=‘r’, buffering=-1, encoding=None, errors=None, newline=None, closefd=True) 从官方文档中我们可以看到o转载 2017-09-24 21:08:35 · 242 阅读 · 0 评论 -
爬虫开发过程常见的问题
爬虫在开发过程中也有很多复用的过程,这里总结一下,以后也能省些事情。 1、基本抓取网页 get方法 import urllib2 url = "http://www.baidu.com" response = urllib2.urlopen(url) print response.read() post方法 import urllib import urllib2转载 2017-09-24 17:21:52 · 886 阅读 · 0 评论