class NullCookieProcessor mechanize HTTPCookieProcessor def http_reque

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
>>> class NullCookieProcessor(mechanize.HTTPCookieProcessor):
... def http_request(self, request): return request
... def http_response(self, request, response): return response
...
>>> opener = mechanize.build_opener(NullCookieProcessor)
>>> request = mechanize.Request('http://mamba.ru/tips/?tip=Login')
>>> response = mechanize.urlopen(request)
>>> cj = mechanize.CookieJar()
>>> dumps = pickle.dumps(cj)
>>> dumps
"(imechanize._clientcookie\nCookieJar\np0\n(dp1\nS'_policy'\np2\n(imechanize._clientcookie\nDefaultCookiePolicy\np3\n(dp4\nS'strict_rfc2965_unverifiable'\np5\nI01\nsS'strict_ns_domain'\np6\nI0\nsS'_allowed_domains'\np7\nNsS'rfc2109_as_netscape'\np8\nNsS'rfc2965'\np9\nI00\nsS'strict_domain'\np10\nI00\nsS'strict_ns_set_path'\np11\nI00\nsS'strict_ns_unverifiable'\np12\nI00\nsS'strict_ns_set_initial_dollar'\np13\nI00\nsS'hide_cookie2'\np14\nI00\nsS'_blocked_domains'\np15\n(tsS'netscape'\np16\nI01\nsbsS'_cookies'\np17\n(dp18\nsS'_prev_getitem_index'\np19\nI0\nsb."
>>>