![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 87 阅读 · 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 · 461 阅读 · 0 评论