I
I
Ilya2015-03-23 03:56:29
Python
Ilya, 2015-03-23 03:56:29

Where can I get csrf token for lk.megafon.ru?

I want to pass authorization on lk.megafon.ru . In the browser, I looked at the data from the post request when passing authorization.
Request address: https://lk.megafon.ru/dologin/
CSRF: long character set
j_username: everything is clear
here j_password: here too
Where can I get the CSRF value? On stackoverflow.com , in a similar question, they wrote that it needs to be pulled out of cookies. They used the following code for this:

s.get(url)    # to get cookies
csrf = s.cookies['csrf']

Well, if I do the same (for url I used: https://lk.megafon.ru/dologin/ ), and I
print(dict(s.cookies))
see a dictionary in which there is only one key-value pair - JSESSIONID: many characters

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey K, 2015-03-23
@Quirel

There is a global variable CSRF_PARAM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question