Answer the question
In order to leave comments, you need to log in
How to access the megaphone API?
Welcome all!
The bottom line is this:
There is an "exhaust" megaphone API, which works only 600 seconds after authorization in the personal account.
Interested, of course, this is https://lk.megafon.ru/api/lk/options/remaindersMini. (in the picture)
When trying to log in:
login = '**********'
password = '******'
url = 'https://lk.megafon.ru'
pag = requests.get(url, auth=HTTPDigestAuth(login, password), headers=headers, timeout=5)
client.get(url)
csrftoken = client.cookies
print (csrftoken)
<RequestsCookieJar[<Cookie APP-VERSION=3.42.0/3.41.0-c712e65e-583f-464c-8e4f-bcebc04032ef for lk.megafon.ru/>,
<Cookie CSRF-TOKEN=14ffd46f-23df-442a-8892-2debfe351c46 for lk.megafon.ru/>,
<Cookie DEVICE-ID=2f242392-a15c-11e7-97be-0050568c7394 for lk.megafon.ru/>,
<Cookie JSESSIONID=D47483D92D4DF6B9B59CC067410638CE.2B for lk.megafon.ru/>,
<Cookie NGX-CACHE-VERSION=3.41.0-c712e65e-583f-464c-8e4f-bcebc04032ef for lk.megafon.ru/>]>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question