M
M
maimurs2018-03-15 22:14:26
Django
maimurs, 2018-03-15 22:14:26

How to get authorization through ESIA in python?

There is a python script that was used to upload a dbf file with data (it takes about 20 minutes, but this does not affect the essence of the issue). Previously, everything was done using the requests library , but recently the site on which the upload was carried out changed the authorization scheme. If earlier the entrance was by login / password, now authorization is carried out through the ESIA (Government Services Portal) and further selection of the attached old login.
Unfortunately, I could not find a way to get authorization using the requests library and continue the script. Libraries BeuatifulSoup, Mechanize did not help me either. On the Internet, information about the opposite task, i.e. how to fasten authorization through the ESIA to something. At the moment, I got out of the situation with the help of the Selenium library.
But:

  1. Complicated control, tk. the browser is launched in a graphical environment, more possible errors
  2. The graphical environment requires more resources
  3. Due to the lack of graphics on the server and the failure of the geckodriver to work on FreeBSD, the script moved to another machine, where a graphical session is constantly running. Added another point of failure. I don’t think it’s possible to transfer the Django project to this machine, a lot of things still have to be transferred, there is also a zotonic project on the server and a zabbix web interface

Actually the question is: maybe there is still an easier way to authorize through the ESIA and you shouldn’t be so perverted?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Kucherov, 2018-03-15
@DexterHD

http://minsvyaz.ru/common/upload/method[1].pdf
This document should help, it contains all the necessary information about integration with the ESIA.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question