import requests
headers = {
"User-Agent":
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36",
'Content-Type': 'text/html; charset=UTF-8'}
s = requests.Session()
s.headers.update(headers)
s.get('https://edu.tatar.ru')
s = s.post('https://edu.tatar.ru/logon', data={'main_login': 'login', 'main_password':'pass'})
print(s.text)
s = requests.Session()
s.headers.update(headers)
s.post('https://edu.tatar.ru/logon', data={'main_login': 'login', 'main_password':'pass'})
response = s.get('https://edu.tatar.ru')
print(response.text)