urlib - automatic cookie handling

Alex Hunsley lard at tardis.ed.ac.molar.uk
Tue Jun 29 16:28:04 CEST 2004


Pierre-Frédéric Caillaud wrote:

> 
>     Yes.
> 
>     First fetch the URL which gives you the cookie. Parse the HTTP 
> headers to  get the cookie (use the header parsing function and get the 
> Set-Cookie  header). Then send the cookie in your headers along your 
> next request, and  you're in. For this you must use urllib2 which allows 
> custom headers (use   request.headers or something).
> 
thanks for your response!
An even better answer, which I've just found:
http://wwwsearch.sourceforge.net/ClientCookie

Can I ask that you please don't top-post? It makes threads hard to follow...

thanks
alex




More information about the Python-list mailing list