Skip to content

Instantly share code, notes, and snippets.

@hoxnox
Created November 8, 2022 07:52
Show Gist options
  • Save hoxnox/1b358723a5361b4c3141d4260b444590 to your computer and use it in GitHub Desktop.
Save hoxnox/1b358723a5361b4c3141d4260b444590 to your computer and use it in GitHub Desktop.
#!/bin/bash
source .env
PROXY="${PROXY:-socks5://user:pass@host:port}"
COOKIE="${COOKIE:-uid=UID; pass=ENCPASS}"
BASEURL="http://dl.kinozal.tv/download.php"
TORRENTDIR="/media/data/transmission"
LOG="/var/log/torrent.log"
declare -A pairs=( \
[1938075]="periferal" \
[1938029]="american.horror.story" \
[1927288]="novie.tancy" \
)
for ID in "${!pairs[@]}"; do
NAME=${pairs[$ID]}
curl -C - -vvv -o "$TORRENTDIR/$NAME.torrent" -x "$PROXY" --cookie "$COOKIE" $BASEURL\?id\=$ID &>>$LOG
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment