using custom cookies in http
Astan Chee
stanc at al.com.au
Tue Jun 6 01:26:54 EDT 2006
Hi,
Im attemtping to set values of custom cookies and use it to gain access
to certain web-pages that require these custom cookies.
What I've done so far is creating the cookies like so:
import Cookie
C = Cookie.SmartCookie()
C["__user_name"] = "foob"
And Im trying to open a url that requires this cookie:
import urllib
f = urllib.urlopen("http://example.com/page/lies/here")
print f.read()
Now all Im missing is loading the cookie to urllib.
How do I do this?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060606/34b20dee/attachment.html>
More information about the Python-list
mailing list