M
M
Magi2017-10-15 17:19:28
Yandex.Disk
Magi, 2017-10-15 17:19:28

Are there bash scripts for downloading files from the mail.ru cloud and Yandex.disk?

You need to download files from the mail.ru and Yandex.disk clouds in the console. Tell me, are there any scripts for this? especially interested in mail.ru found an example
URL= https://cloud.mail.ru/public/793k/vQ5pgjSqN
FILENAME=filename_replace.rar
URLPART0=$(wget --quiet -O - $URL | grep -o '"weblink_get" :\\+\]' | sed 's/.*"url":"\([^"]\+\)".*/\1/')
URLPART1=$(echo $URL | awk -F '/public/' '{print $2}')
URLPART2=$(wget --quiet -O - " https://cloud.mail.ru/api/v2/tokens/download " | sed 's /.*"token":"\([^"]\+\)".*/\1/')
wget --no-check-certificate --referer=$URL "$URLPART0/$URLPART1/$FILENAME ?key=$URLPART2" -O $FILENAME

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2017-10-15
@alexey-m-ukolov

I wrote mine: https://github.com/alexey-m-ukolov/cloud.mail.ru-d...
Background: https://habrahabr.ru/post/278849/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question