Python Authentication with urllib2
<p>So I'm trying to download a file from a site called vsearch.cisco.com with python</p>

<p>[python]</p>

<pre><code>#Connects to the Cisco Server and Downloads files at the URL specified

import urllib2

#Define Useful Variables

url = 'http://vsearch.cisco.com'
username = 'xxxxxxxx'
password = 'xxxxxxxx'
realm = 'CEC'

# Begin Making connection

# Create a Handler -- Also could be where the error lies

handler = urllib2.HTTPDigestAuthHandler()
handler.add_password(realm,url,username,password)

# Create an Opener

opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)

try:
    urllib2.urlopen(url)
    print f.read()

except urllib2.HTTPError, e:
    print e.code
    print e.header
</code></pre>

<p>[/python]</p>

<p>My error is ValueError: AbstractDigestAuthHandler doesn't know about basic</p>

<p>I've tried using Basic HTML Authorization handlers and even HTTPS handlers. Nothing gives me access. This error is different from all the other errors however. The other errors are simply 401 HTML errors</p>

<p>Any suggestions on how to do this?</p>
