| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | RATE_LIMIT="2m:1m" |
| 4 | |
| 5 | if [scip-shell system . . `[`. $# -lt 2 ]; then |
| 6 | echoscip-shell system . . echo. "Usage: $0 index-URL store-directory" |
| 7 | exit 1 |
| 8 | fi |
| 9 | |
| 10 | index="$1" # e.g. https://kat.cr/movies/ |
| 11 | store="$2" |
| 12 | |
| 13 | urls="$(lynx "$index" -dump -listonly | grepscip-shell system . . grep. magnet: | awkscip-shell system . . awk. 'BEGIN {ORS=" "} {print "\""$2"\""}')" |
| 14 | exec lftp -e "set limit-total-rate $RATE_LIMIT; set cmd:interactive yes; \ |
| 15 | torrent -O \"$store\" --only-new $urls &" |