M
M
Mlkw2022-03-09 17:45:13
Python
Mlkw, 2022-03-09 17:45:13

How to login using python requests?

I don’t know how to formulate exactly, I don’t understand, therefore I’m looking for at least some information.
I want to learn how to log in to sites using python requests to further perform routine tasks, but the difficulty lies in the authorization mechanisms (catching requests). I started with hh. ru, I can't find the required post request on hh.ru (not advertising) for authorization? I'm trying to log in with the wrong data to extract it, but nothing is simply displayed in the chrome panel, only some post on facebook. Get I did, I pulled out the csrf token.
6228bd730f092588234369.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
soremix, 2022-03-09
@Mlkw

Does the page reload after a failed attempt? You need to check the “preserve log” box in the requests tab of chrome

A
Alan Gibizov, 2022-03-09
@phaggi

If you are looking for at least some information, then look in the search bar at the top for the text “requests authorization”. Lots of answers with examples.

K
Kadabrov, 2022-03-09
@Kadabrov

start by studying browser devtools, how to catch requests, what they contain,
then log in to the site and get data from devtools, what type of request was sent, how the request payload is formatted, what it contains
then create requests.Session()
and send in it the right queries

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question