![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python3爬虫学习路上
文章平均质量分 65
天纵神武丶
簸鸿蒙,扇雷霆。斗转而天动,山摇而海倾。怒无所搏,雄无所争。
展开
-
python Spider Man(一)
from urllib import request #导入urllib 下的requestimport randomdef spider(url): #配置多个浏览器 user_agent_list = [ "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,原创 2018-03-04 20:33:43 · 362 阅读 · 0 评论 -
python Spider Man(爬虫侠)二,之百度翻译小程序
from urllib import request,parseimport jsondef fanyi(msg): data = { 'kw':content } data = parse.urlencode(data)#把字典改成kw=content 这种 basr_url = 'http:/...原创 2018-03-05 22:04:02 · 364 阅读 · 0 评论 -
python Spider Man(爬虫侠)三,之cookie进行人人网页面爬取
from urllib import request,parsefrom http import cookiejarcookie = cookiejar.CookieJar()#生成cookie对象cookie_handler = request.HTTPCookieProcessor(cookie)http_handler = request.HTTPHandler()# http...原创 2018-03-05 22:16:46 · 625 阅读 · 0 评论