Changes since 0.02a
ClientCookie is a Python module for handling cookies on the client side, useful for accessing web sites that require cookies to be set, and returned later. It is a port of Gisle Aas' Perl module HTTP::Cookies, from the libwww-perl library. Both RFC2965 and Netscape cookies are supported.
import ClientCookie import urllib2 request = urllib2.Request("http://www.acme.com/")
# note we're using the urlopen from ClientCookie, not urllib2
result = ClientCookie.urlopen(request)
# let's say this next request requires a cookie that was set in result
request2 = urllib2.Request("http://www.acme.com/flying_machines.html") result2 = ClientCookie.urlopen(request2)
Python 2.0 or above is required (though I may fix it to work with 1.52 eventually), and urllib2 is recommended but not required. Note that the version of urllib2 from Python 2.0 is too old: if you have Python 2.0, get the version from Python 2.1 (available from the source distribution or CVS from http://www.python.org).
Distributed under the Perl Artistic License.