Answer the question
In order to leave comments, you need to log in
Login to Habré (and other sites) via Python (urllib)?
How to log in to Habré through the urllib Python library.
I saw in Q&A “how to log in to VKontakte via get-requests”, so the question is how to independently find ways to log in to other sites, and not constantly ask for each site separately.
Answer the question
In order to leave comments, you need to log in
Install yourself an http sniffer . If you have firefox, I recommend the HttpFox add-on .
How to find out what request to send for login:
Turn on the sniffer, log in to the site (it is better to turn on the sniffer directly at the time of login so as not to clog it with unnecessary requests), then see what the browser has sent to the server. Usually this is one POST request, in the fields of which you can find the login and password. The same request must be sent by a script.
Send a POST or GET login request, depending on the site. See Set-Cookie in the response in headers
and send with the Cookie header in the following requests (example Cookie: xxx=yyy).
Read about how cookies work in HTTP or look at the request headers in the firebug.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question