#!/bin/bash #############==============-------------- # Mininova SSATEUR: Site-Specific Automatic Torrent Extractor Using RSS # Authored By: Andrew Rowls # !--> Works ONLY with torrent feeds from http://www.mininova.org/ # !--> If this script successfully parses feeds from any other site, it's sheer coincidence # #####==============-------------- # IMPORTANT: While mininova has not implemented CAPTCHAs, you should still be courteous towards them # While I don't believe this script will particularly tax mininova's servers simply by being run # once, you should not be so rude as to run it many times within a short time span, especially # if you have many feeds you check. Since TV shows typically don't air more than once a week, # ideally you should only run this script once a week. However, since it is typically desirable # to have a copy of a show by the day after it airs, I would recommend running the script no more # than once per day, at least several hours after the latest show of interest has aired. For # example, my shows typically air around 8-10PM EDT. The torrents for these shows are guaranteed # to show up by 5AM the next morning. Therefore, I have cron set to run this script once per day at # 5AM. This almost guarantees that I will be able to start downloading shows from the # previous night. # Again, please be courteous when setting this script to run. And don't blame me if mininova # bans your IP for excessive bandwidth usage (or any other reason, for that matter) # #####==============-------------- # See the README for an explanation of the script # #####==============-------------- # # Fixes some issues with CRON's default env. Change HOME to your home directory, or remove if appropriate PATH=/bin:/usr/bin:/usr/sbin:$PATH HOME=/home/andrew db=~/bin/mininovarss/gotten.txt dest=/torrents/loading feeds=~/bin/mininovarss/feeds.txt #cookies=~/bin/mininovarss/cookies.txt #cookies=`echo "$cookies" | replace " " "\ "` #wgetopts="--keep-session-cookies --load-cookies $cookies --save-cookies $cookies" wgetopts="" # Check if Mininova is up. If not, wait 2hrs before trying again. Etc. ping=`ping -c 1 -t 60 mininova.org 2>&1 | grep "\(unknown host\)\|\(Time to live exceeded\)\|\(opendns.com\)" -c` while [ $ping -eq 1 ]; do #echo -e "`date`\tMiniNova.org is down." sleep 120m ping=`ping -c 1 -t 60 xtvi.com 2>&1 | grep "\(unknown host\)\|\(Time to live exceeded\)\|\(opendns.com\)" -c` done feeds=`cat "$feeds" | grep -v "^#"` for RSS in $feeds; do titles=`wget $RSS -O- 2>/dev/null | sed "s/<\/item>/<\/item>\n/" | grep -io "