Answer the question
In order to leave comments, you need to log in
Can't login to the site?
I can't log in to the site. The POST request returns status code 200, but the authorization page is displayed. What could be the problem?
s = requests.Session()
url = 'https://edu.susu.ru/'
r = s.get(url)
soup = BeautifulSoup(r.text, 'html.parser')
token = soup.find('input', dict(name='logintoken'))['value']
data = {'anchor':'',
'username': '***',
'password': '***',
'rememberusername':'1',
'logintoken':token
}
r = s.post(url, data=data)
print(r.status_code)
r = s.get(url)
print(r.text)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question