Answer the question
In order to leave comments, you need to log in
How to authorize on the mos.ru website using requests?
Good afternoon, there is a desire to write a script for authorization on mos.ru, but there were problems with the implementation.
Here is the code:
import requests
def test():
session = requests.Session()
url ='https://oauth20.mos.ru/sps/j_security_check'
data ={'j_username':'ТЕЛЕФОН', 'j_password':'ПАРОЛЬ','accessType':'phone'}
print(requests.post(url,data=data).text)
Answer the question
In order to leave comments, you need to log in
Since they write that an error in the url can really be mistyped?
Check spelling.
If it does not work out, I recommend opening the fox / chrome console and looking on the network to see how the authorization is going.
I recommend paying attention to the cookie tab, a lot also depends on it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question