urllib2, cookies and redirect.
Jean-Marc Hoeltzli
jm.hoeltzli at coelis.com
Wed Apr 24 06:12:57 EDT 2002
Hi,
I would like to get an http documment whith the ulrlib2, but
-the remote server send me a cookie whith a documment I retrieved bofore.
-i do
myreq=myurllib2.Request(the_url)
myreq.add_header("Cookie",Cook)
urlh=myurllib2.urlopen(myreq)
data=urlh.read()
to get my documment.
-the webserver answer is an HTTP 302, which is handeled by the urllib2, but
the second get doesn't send the cookie.
any idea ??
Jean-Marc
More information about the Python-list
mailing list