
Python
digiterrush
这个作者很懒,什么都没留下…
展开
-
Python urllib2 Note
http://docs.python.org/library/urllib2.html记一些我的理解通常情况需要urllib2.build_opener([handler, ...])生成一个opener,并通过该opener来访问URL[code="python"]proxy_handler = urllib2.ProxyHandler({'http': 'http:...原创 2011-08-24 17:57:38 · 114 阅读 · 0 评论 -
Python 自动登录网站(处理Cookie)
[code="python"]def login(): cj = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) login_url = r'http://zhixing.bjtu.edu.cn/member.php?mod=logging&a...原创 2011-12-10 15:51:48 · 487 阅读 · 0 评论