PMAsite="сайт"
username="логин"
password="пароль"
req = urllib2.Request(PMAsite)
auth = base64.encodestring(
'%s:%s' % (username, password))
authheader = "Basic %s" % auth
req.add_header('Authorization',authheader)
HT=urllib2.urlopen(req)
f=HT.read()
print f