http authentication

huthut at my-deja.com huthut at my-deja.com
Sat Jan 13 19:40:26 EST 2001


Please forgive my, probably, very naive question.
Im trying to hack togethe ra script that will
download a number of files off a internet site.
The only problem is that this site is password
protected (in IE a box pops up for username and
password). So first i tried the
urllib.FancyURLopener.open(url) which prompted me
for a username but then froze. Then i tried .open
('http://user:password@www.somewhere.com') but
then i got:

File "c:\python20\lib\urllib.py", line 513, in
__init__
    apply(URLopener.__init__, (self,) + args)
  File "c:\python20\lib\urllib.py", line 91, in
__init__
    assert hasattr(proxies, 'has_key'), "proxies
must be a mapping"
AssertionError: proxies must be a mapping

Does anyone have any suggestions?

Thanks!


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list