Problem with urllib2 and authentification
Rob Wolfe
rw at smsnet.pl
Tue Apr 22 14:39:16 EDT 2008
Rob Wolfe <rw at smsnet.pl> writes:
>> ---script:
>> import urllib2
>>
>> protocolo='http://'
>> servidor='10.28.1.239/'
>> pagina='manage'
>> fullurl=protocolo+servidor+pagina
>>
>> aut=urllib2.HTTPBasicAuthHandler()
>> aut.add_password(realm=None,
>> uri=servidor,
>> user='myadmin',
>> passwd='mypass')
>> opener=urllib2.build_opener(aut, urllib2.HTTPHandler(debuglevel=1))
Please ignore me. I overlooked that you added this handler here.
But anyway I would try this `add_handler` method. ;)
Rob
More information about the Python-list
mailing list