2018年11月28日
摘要: Python中的urllib模块(爬虫) #普通爬虫 import urllib.requestrepon=urllib.request.urlopen("http://www.baidu.com") #获取访问url返回的数据data=repon.read().decode("utf-8") #将 阅读全文
posted @ 2018-11-28 10:27 wfw001 阅读(63) 评论(0) 推荐(0) 编辑
摘要: import urllib.requestimport random#urlurl="http://www.baidu.com" '''#模拟单个请求头headers={ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWe 阅读全文
posted @ 2018-11-28 10:20 wfw001 阅读(790) 评论(0) 推荐(0) 编辑