Re: jpopsuki small seed downloader

From Buff Lion, 4 Months ago, written in Bash, viewed 59 times. This paste is a reply to jpopsuki small seed downloader from NAT - view diff
URL https://code.nat.moe/view/9e02dafd Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3. ### jpopsuki configuration ###
  4. cookie='Cookie: PHPSESSID=...'           # your jpopsuki's cookie, you can get it by
  5.                                          # doing "alert(document.cookie)" in your
  6.                                          # browser's console.
  7.  
  8. query_string='order_by=s4&order_way=ASC' # get torrents in the order of size,
  9.                                          # ascending
  10.  
  11. start_page=1                             # start download from page 1
  12. end_page=40                              # and end at page 40 (seed #2000, normally)
  13.  
  14. ### transmissiond configuration ###
  15. transmission_host='http://example.com:9091/transmission' # URL to transmission PRC
  16.  
  17. transmission_auth='username:password'                    # your transmission RPC
  18.                                                          # credential
  19.  
  20. #### uncomment next line if you done configuration ###
  21. #run=true
  22.  
  23. [[ -z $run ]] && echo "[*] Configure Required!" && exit 1
  24.  
  25. tmp=$(mktemp)
  26.  
  27. for page in $(seq $start_page $end_page)
  28. do
  29.         echo "[$(date)] Started Page $page"
  30.         curl -H $cookie -s "http://jpopsuki.eu/torrents.php?page=${page}&${query_string}" | grep 'action=download' | sed 's/\&/\&/g; s/"/"/g;' | awk -F'href="' '{print $2}' | awk -F'"' '{print $1}' | sed -e 's/^/http:\/\/jpopsuki.eu\//g' | while read -r url
  31.                 do
  32.                         echo -n "[*] Procressing torrent id $(awk -F"id=|&" '{print $3}' <<< $url)..."
  33.                         transmission-remote $transmission_host -n $transmission_auth -a $url > $tmp
  34.                         [[ ! $? == 0 ]] && echo " err: $(cat $tmp)" || echo " ok"
  35.                 done
  36. done
  37. rm $tmp
  38. echo "[$(date)] Done"

Reply to "Re: jpopsuki small seed downloader"

Here you can reply to the paste above

captcha