cookielib是一个用于处理客户端HTTP cookie的模块
https://docs.python.org/2/library/cookielib.html?highlight=cookielib#cookielib
In [191]: import cookielib,urllib2 In [192]: cj=cookielib.CookieJar() In [193]: openner=urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) In [194]: r=openner.open("http://www.baidu.com/")
本文出自 “Linux SA John” 博客,请务必保留此出处http://john88wang.blog.51cto.com/2165294/1529806