在python语言中,cookielib是一个用于处理客户端http cookie的模块,模块说明地址:
https://docs.python.org/2/library/cookielib.html?highlight=cookielib#cookielib
例子,python 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.yuju100.com/")