D. Hartley wrote:
> P.S. Kent - thank you for the helpful tutorials on authentication,
> they really cleared up the process a great deal. The only problem is:
>
> When I create an opener to process the cookies, it looks like this:
>
> opener =
> urllib2.build_opener(urllib2.HTTPCookieProcessor(
>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 = opener2.open("
> -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
> open
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 mo
> -Original Message-
>
> Hello, everyone!
Hi,
> 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. Does anyone know
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 = urllib