Попробуйте так:
#!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
import requests
from requests.auth import HTTPDigestAuth
headers = {
'User-agent': 'Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-language': 'ru,en-US;q=0.7,en;q=0.3',
'Accept-encoding': 'gzip, deflate',
'Dnt': '1',
'Connection': 'keep-alive',
'Cache-Control' : "max-age=0",
'Cookie' : "_gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1",
'Upgrade-insecure-requests': '1',
'X-DNS-Prefetch-Control': 'on',
'Cf-Visitor': '{"scheme":"https"}',
'X-Forwarded-Proto': 'https'
}
login = 'userid'
password = 't43dwd'
url = 'https://site.ru/adminpanel/index.php'
startp = requests.get(url, auth=HTTPDigestAuth(login, password), headers=headers).text
print (startp)