[Tutor] I sure do love cookies.
kent37 at tds.net
Sat Jul 2 03:16:25 CEST 2005
D. Hartley wrote:
> Anyone have a good (*simple*) tutorial on making/sending cookies via
> python? (i.e., not receiving/messing with them).
What I did was,
- create a new cookielib.Cookie
- add the cookie to the CookieJar
- make a request the same way as when I was collecting cookies
To create the new Cookie it might help to look at the source for cookielib (Lib\cookielib.py), the Cookie constructor doesn't seem to be documented anywhere.
To figure out the values for the Cookie constructor it might help to look at one of the cookies you already have.
More information about the Tutor