mirror of
https://github.com/Threnklyn/premiumize-cli.git
synced 2026-05-19 13:23:29 +02:00
init
This commit is contained in:
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
id="[USERID]"
|
||||
pass="[USERPASS]"
|
||||
|
||||
|
||||
case "$1" in
|
||||
*.dlc)
|
||||
links=$(curl -s 'http://dcrypt.it/decrypt/paste' --data-urlencode "content@$1" |jq -r .success.links|grep -Po '[\w\d:/\.]+')
|
||||
;;
|
||||
*.links)
|
||||
links=$(cat $1)
|
||||
;;
|
||||
*.txt)
|
||||
links=$(cat $1)
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 { dlc-File | list-File }"
|
||||
echo "A File containing a list of URLs"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
||||
for i in $links;
|
||||
do
|
||||
JSON=$(curl -s "https://api.premiumize.me/pm-api/v1.php?method=directdownloadlink¶ms\[login\]=$id¶ms\[pass\]=$pass¶ms\[link\]=$i")
|
||||
|
||||
LOCATION=$(echo $JSON | jq -r .result.location)
|
||||
NAME=$(echo $JSON | jq -r .result.filename)
|
||||
|
||||
echo $NAME
|
||||
curl --progress-bar -o $NAME $LOCATION
|
||||
done
|
||||
Reference in New Issue
Block a user