tl; dr

How to programmatically log in to Yandex. Photos , and get cookies (maybe something else) for program execution of the request at http://fotki.yandex.ru/internal/get-my-albums.xml ?

Prehistory

It is necessary to quickly receive a collection of albums on the Yandex.Fotki service in order to form from them an already local cache. But, since the service has a hard limit of 100 recordings per one page of the collection, this operation takes a lot of time “head on” - there are already more than 10,000 albums.

Below is the text of my previous question on the Toaster:


How to quickly get a hierarchy of albums on Yandex. Photos?

If you follow the official documentation, you should build a hierarchy as follows:

  • Page by page to read the entire collection of albums (100 pieces per page maximum)
  • View Each Entry Element
  • Build a hierarchy of links to parent albums

However, on large volumes it works extremely slowly. With ~ 8000 albums, ~ 80 network requests are required.

Parallelization of these requests is not possible, since all IDs (and dates of update) of albums are not known in advance. Therefore, it is necessary to literally download "page by page" - in each page there is a link to the next page.

At the same time, there are such links on Yandex. Photos (you need to log in)

  • fotki.yandex.ru/actions/ajax-albums-list.xml?author=USERNAME
  • fotki.yandex.ru/internal/get-my-albums.xml

which give the generated list very quickly (yes, it is incomplete, but here it is not important).

Question: where to dig to speed up the loading of the tree?

Maybe there is some undocumented opportunity to get a tree by API? If not, how can I log in to Yandex. Photos software (OAuth token does not work) to send requests for this URL - fotki.yandex.ru/internal/get-my-albums.xml?


Our days

No matter how I tried to create a list of pages of the collection using standard tools, nothing happens. Yandex support is not responding.

Therefore, I now see only one way out - programmatically log in to Yandex (Yandex.Passport, probably) and send easily on this URL - fotki.yandex.ru/internal/get-my-albums.xml.

However, I cannot do this - OAuth authentication does not work, and I don’t understand how to log in using the Yandex.Paspot login password.

Question : How to programmatically log in to Yandex. Photos , and get cookies (maybe something else) for program execution of the request at http://fotki.yandex.ru/internal/get-my-albums.xml

    0