watch-dir-enabled
and watch-dir
), and in rTorrent you need to add the following line to the configuration file:schedule = watch_directory,5,5,load_start=./watch/*.torrent
wget
command:wget -qO - http://www.lostfilm.tv/rssdd.xml
-q
" option tells wget not to display information about their work, i.e. " be quiet ";-O -
" causes the loaded tape to be output not to a file, but to the standard output stream. This is done so that the data obtained can be passed down a pipeline to the input of the grep filter.'http.*torrent'
. Here the point symbol means “any character” and the asterisk means “repeat any number of times”. Those. we will find all entries starting with “http” and ending with “torrent” which will be links to torrent files. The team itself looks like this:grep -ioe 'http.*torrent'
-i
" is case-insensitive search,-o
" - select only the matched part of the substring (done to filter the tags that surround the link),-e
" - search by regular expressionhttp://lostfilm.tv/download.php/2030/The.Oscars.The.Red.Carpet.2010.rus.LostFilm.TV.torrent
'[0-9]{4}/(lost|house|lie|spartacus)'
. It searches for 4 digits in a row ("[0-9] {4}", where the number of repetitions is given in curly braces), followed by a slash, and then one of the four choices by series name (" (lost|house|lie|spartacus)
", where the character" | "is read as OR). But, for the grep command, service characters need to be escaped with "\". Total, we have:grep -ie '[0-9]\{4\}/\(lost\|house\|lie\|spartacus\)'
wget
team can load cookies
from the specified file. Look at the wget
call:wget -nc -qi - -P ~/.config/watch_dir --load-cookies=~/.config/cookies.txt
-nc
" tells the command not to reload files if we already have them on the disk,-q
" - option above, indicates the command " to be quiet ",-i -
" - get a list of files to load from standard input,-P ~/.config/watch_dir
" - an indication of our tracking folder where files will be downloaded,--load-cookies=~/.config/cookies.txt
" - use cookies from the specified file.cookies
has the following format:.lostfilm.tv TRUE / FALSE 2147483643 pass < >
.lostfilm.tv TRUE / FALSE 2147483643 uid < >
wget'
to wget'
.wget -qO - http://www.lostfilm.tv/rssdd.xml | grep -ioe 'http.*torrent' | grep -ie '[0-9]\{4\}/\(lost\|house\|lie\|spartacus\)' | wget -nc -qi - -P ~/.config/watch_dir --load-cookies=~/.config/cookies.txt
cron
:*/15 * * * * wget -qO - http://www.lostfilm.tv/rssdd.xml | grep -ioe 'http.*torrent' | grep -ie '[0-9]\{4\}/\(lost\|house\|lie\|spartacus\)' | wget -nc -qi - -P ~/.config/watch_dir --load-cookies=~/.config/cookies.txt > /dev/null 2>&1
> /dev/null 2>&1
" suppresses the output of the command and thus does not force cron
generate you an email with the output of commands.wget
command in the pipeline with the following:wget -nc -qi - -P ~/ --header "Cookie: uid=***; pass=***"
Source: https://habr.com/ru/post/87042/
All Articles