title: Python handling username and password for URL
body: <p>Messing with Python and I'm trying to use this <a href="https://updates.opendns.com/nic/update?hostname=" rel="noreferrer">https://updates.opendns.com/nic/update?hostname=</a>, when you got to the URL it will prompt a username and password. I've been looking around and I found something about password managers, so I came up with this:</p>
  
  <pre><code>urll = "http://url.com"
  username = "username"
  password = "password"
  
  passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
  
  passman.add_password(None, urll, username, password)
  
  authhandler = urllib2.HTTPBasicAuthHandler(passman)
  
  urllib2 = urllib2.build_opener(authhandler)
  
  pagehandle = urllib.urlopen(urll)
  
  print (pagehandle.read())
  </code></pre>
  
  <p>This all works, but it's prompting the username and password via the command line, requiring the user's interaction. I want it to automatically enter those values. What am I doing wrong?</p>