08 2017 档案

摘要:方法一 使用build_opener()修改报头 阅读全文
posted @ 2017-08-10 15:27 独善其身412 阅读(147) 评论(0) 推荐(0)
摘要:首先导入urllib库 import urllib.ruquest 导入库 file = urllib.request.urlopen("http://www.baidu.com")打开并爬取一个网页 data = file.read() 读取全部内容 dataline = file.readlin 阅读全文
posted @ 2017-08-09 17:52 独善其身412 阅读(338) 评论(0) 推荐(0)