Hello, everyone!
I am trying to go to a website, collect any and all cookies I receive
by going to that website, and then look at the cookies/print them.
So I did the following, from the cookie examples in the documentation:
import cookielib, urllib2
myjar = cookielib.CookieJar()
opener =
D. Hartley wrote:
My problem is, when I plug this url into my sample code above, I get
an error (HTTP Error 401: Authorization Required), because normally
when you go to this url it makes you enter in a username and a
password.
(Also, there is lots of documentation on the cookie modules,
-Original Message-
Christian,
Try subclassing urllib.FancyURLopener and overriding the
prompt_user_passwd() method. That should get you what you need :-)
Well, I used urllib.FancyURLopener, and can open and look at
the url, like this:
import urllib
opener2 =
From Christian:
Try subclassing urllib.FancyURLopener and overriding the
prompt_user_passwd() method. That should get you what you need :-)
Well, I used urllib.FancyURLopener, and can open and look at the url, like this:
import urllib
opener2 = urllib.FancyURLopener({})
f =