摘要: 实现个爬虫小例子,用浏览器登录百度帐号后,不要退出。运行如下代码: 1 # -*- coding: utf-8 -*- 2 import re,sys 3 import urllib,urllib2,cookielib 4 class Requests: 5 def __init__(self): 6 cj = cookielib.CookieJar() 7 opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) 8 urllib2.install_open... 阅读全文
posted @ 2013-10-20 18:33 除e尘 阅读(2037) 评论(1) 推荐(1) 编辑