cloud.mail.ru direct download

Post Reply
mrtrollson
Mini-Hunter
Posts: 1
Joined: 04 Jun 2021, 20:02
Been thanked: 2 times

cloud.mail.ru direct download

Post by mrtrollson »

Here's a way to get a (temporary) direct download link from a regular cloud.mail.ru link, for those who don't want to use JDownloader and maybe want to make their own scripts.

(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":
For example with this command:

Code: Select all

curl -A '' https://cloud.mail.ru/public/<ID> | grep -oP '"weblink_get":.*?"url":\s*"(https:[^"]+)'
With this you should find a URL, which we will call the base url. If there was just one file shared in the link, you can get a DLL like so:
<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)
ZRH
Moto-Terminator
Posts: 33
Joined: 31 Mar 2021, 12:01
Been thanked: 25 times

cloud.mail.ru direct download

Post by ZRH »

"don't want to use JDownloader"

nah im good with a download manager
To get my happiness I had done everything,
But had done nothing to be blamed and accused of.
The sound of footsteps became louder every day,
Then I kept pretending not to hear.
User avatar
plmqazy
Mini-Hunter
Posts: 3
Joined: 23 Mar 2024, 00:25
Has thanked: 6 times

cloud.mail.ru direct download

Post by plmqazy »

Thanks, this was actually really useful!
Kemalettin
Mini-Hunter
Posts: 1
Joined: 23 Mar 2024, 16:32
Has thanked: 1 time

cloud.mail.ru direct download

Post by Kemalettin »

I'm fine with JDownloader but having an alternative wouldn't hurt. I'll try this out.
kalogeorge
Mini-Hunter
Posts: 2
Joined: 07 Apr 2021, 18:08
Has thanked: 2 times

cloud.mail.ru direct download

Post by kalogeorge »

I have noticed the VPN+JDownloader combination does not work.
Any ideas why?
User avatar
platformers123
Mini-Hunter
Posts: 9
Joined: 13 Dec 2023, 17:04
Has thanked: 31 times

cloud.mail.ru direct download

Post by platformers123 »

Thanks, mrtrollson!
So, if you have a folder, you have to
1) Go to https://cloud.mail.ru/api/v2/folder?weblink=<ID> to get the list of files
2) Add the <ID> and <file name of desired file> to the weblink obtained from "weblink_get":{"count":"1","url":"<url>".

There must be some way to have a script that shows the list of files in the terminal and that lets you select the desired file, then parse it to the weblink in step 2.
Does anybody know how to do this in bash?
User avatar
Fatman
Mini-Hunter
Posts: 7
Joined: 27 Jun 2017, 16:59
Has thanked: 4 times

cloud.mail.ru direct download

Post by Fatman »

Does this bypass the need to having a logged in cloud.mail.ru account in order to download files?
Post Reply
  • Similar Topics
    Replies
    Views
    Last post