Luca Cerone <[email protected]> writes: > ... Python has a module for cookie handling: "cookielib" ("cookiejar" in Python 3).
"urllib2" has a standard way to integrate with this module. However, I do not know the details (check the documentation for the modules). I have used "cookielib" externally to "urllib2". It looks like this: from urllib2 import urlopen, Request from cookielib import CookieJar cookies = CookieJar() .... r = Request(...) cookies.add_cookie_header(r) # set the cookies R = urlopen(r, ...) # make the request cookies.extract_cookies(R, r) # remember the new cookies -- http://mail.python.org/mailman/listinfo/python-list
