Authorization in Yandex does not pass

import requests import json headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'en-en,ru;q=0.8,en-us;q=0.5,en;q=0.3', 'Connection': 'keep-close' } session = requests.session() url = 'https://passport.yandex.ru/passport?mode=auth&retpath=https://yandex.ru' data = {'login': '********', 'passwd': '********'} r = session.post(url, headers=headers, data=data) 

Yandex OAuth API for my service is not suitable.
tell me what's wrong.

  • one
    First, why did you decide that something was wrong here? Secondly, why did you decide that this code should work at all? How and why did you write it that way? Third, it most likely violates any of the rules of Yandex, which reduces the likelihood of receiving assistance here - andreymal
  • What is not pleased you Yandex API? He is just for this and was invented - Nikita Umnov
  • Judging by the code, you are not trying to log in through that URL. Try the one from the documentation . - Jazzis

0