Possible Duplicate:
python: urllib2 how to send cookie with urlopen request
If I have cookies in my browser, how can I have a python script use these saved cookies for a url request?
For a particular site, I'm looking to find a way for my python script to take the identity of me (as i'm logged in on the browser) and then make a request to the server. It does not need to read the cookies from disk, but rather I would like to just do something like this:
cookies = {"username": "USERNAME", "session": "xxxxxxx"...}
urlopen(url, cookies=cookies) # I know that this doesn't work, just showing you what I intend to do
Is there an easy way of doing this?