这是一个创建于 3683 天前的主题,其中的信息可能已经有所发展或是发生改变。
比如下面这个cookie:
<cookielib.CookieJar[ <Cookie OrigMUID=158D7FF11B506873av9A79E11A7268B0%2c3171e5f2v4cd4ebfb0b95285
480cbd25 for .xxx.com/>, <Cookie SRCHUSR=AUTOREDIR=0&GEOVAR=&DOB=20140402 for .xxx.com/>, <Cookie _FS=NU=1 for .xxx.com/>, <Cookie _HOP= for .xxx.com/>]>
我要删除里面的这一个:<Cookie OrigMUID=158D7FF11B506873av9A79E11A7268B0%2c3171e5f2v4cd4ebfb0b95285
480cbd25 for .xxx.com/>该如何操作
2 条回复 • 1970-01-01 08:00:00 +08:00
|
|
1
cbsw 2014-04-02 23:18:24 +08:00
|
|
|
2
sdlearn 2014-04-04 09:39:08 +08:00
使用的是cookielib模块
这样: cj = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) urllib2.install_opener(opener)
|