(as of 2023. This could stop working anytime)
Links look like this: https://cloud.mail.ru/public/<ID>
with <ID> having the form <PART1>/<PART2> but that's not important.
First parse the HTML page to find something like
Code: Select all
"weblink_get":
Code: Select all
curl -A '' https://cloud.mail.ru/public/<ID> | grep -oP '"weblink_get":.*?"url":\s*"(https:[^"]+)'
<base url>/<ID>
Otherwise, go to https://cloud.mail.ru/api/v2/folder?weblink=<ID> to get a listing of the files and directories there. This is a JSON file. Everything is in body > list. The type field tells you if it's a file or directory, and you get an ID in the weblink field. You can then get a DDL for a particular file with the method above, the DLL would be <base url>/<ID> with <ID> the ID you got from the weblink field.
(Note: didn't test this with directories yet)