I am stuck …
I want to access this page:
“http://nmt:nmt@www.compiz.de/pch/mediathek/index.php”
I try using urllib2 to do this:
**# Create an OpenerDirector with support for Basic HTTP Authentication…
auth_handler = urllib2.HTTPBasicAuthHandler()
auth_handler.add_password(realm=‘ZDFmediathek’,
uri=“http://www.compiz.de/pch/mediathek/index.php”,
user=“nmt”,
passwd=“nmt”)
opener = urllib2.build_opener(auth_handler)
…and install it globally so it can be used with urlopen.
urllib2.install_opener(opener)
urllib2.urlopen(“http://www.compiz.de/pch/mediathek/index.php”)**
==> I get a 401 AUTH error
Any idea , what I do wrong … how else to do this?
