Answer the question
In order to leave comments, you need to log in
How to log in to Yandex using Requests?
I decided to parse wordstat.yandex.ru, I ran into a problem, it turns out that only an authorized user can work with wordstat, a modal window pops up with input
. I tried to do this:
def request(url):
headers = {'user-agent': 'Mozilla/5.0'}
r = requests.Session().get(url, headers=headers, auth=('vasyanya123', '123456'))
return r.text
Answer the question
In order to leave comments, you need to log in
Try this way:
url = 'https://passport.yandex.ru/passport?mode=auth&retpath=https://yandex.ru'
data = {'login': '*****', 'passwd': '*****'}
r = requests.post(url, data=data)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question