Python

python爬虫

2018-04-16  本文已影响60人  天字一等

转载自:http://www.imooc.com/article/15028

爬虫基本架构

网页下载器实现方式(urlib2)

import urllib2    
req = urllib2.Request('http://www.baidu.com')    
response = urllib2.urlopen(req)    
the_page = response.read()    
print the_page 

作者: quantumcheese
链接:http://www.imooc.com/article/15028
来源:慕课网
本文原创发布于慕课网 ,转载请注明出处,谢谢合作

上一篇 下一篇

猜你喜欢

热点阅读