XTVI SSATEUR: Site-Specific Automatic Torrent Extractor Using RSS Authored By: Andrew Rowls !--> Works ONLY with torrent feeds from http://www.xtvi.com/all_tv_shows !--> If this script successfully parses feeds from any other site, it's sheer coincidence #####==============-------------- IMPORTANT: XTVI has implemented CAPTCHAs for a reason. "To protect our servers from heavy traffic". And I agree. While I don't believe this script will particularly tax XTVI'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 XTVI freezes, bans, locks, or warns you, for whatever reason. #####==============-------------- This script parses a list of feeds ($feeds). For each feed, the episode name and season/episode numbers are checked against the database ($db). If the episode is not found as "gotten", the associated .torrent file is downloaded to the specified directory ($dest), where it will be left for whatever Torrent Management System you run. Upon download, the episode will be added to the database $db stores the database, however crude it may be. It is a simple text file of the format $show_name $season_number $episode_number $show_name = the show's full name with periods (.), underscores (_), apostrophes ('), and dashes (-) replaced with spaces ( ), and multiple spaces ( ) reduced to single spaces ( ). $season_number and $episode_number have any leading zeros stripped (01 becomes 1). This is the format expected by the script. If a line does not match this format, the script may or may not match it to an existing torrent. If it matches, the torrent will not be downloaded. Lines in the database file can be commented out with a leading pound (or "hash") sign (#). If you see something weird in the db file (like the show name includes the particular episode's title), then probably the torrent author gave it a non-standard name. $dest = directory the torrent file will be downloaded to. $feeds is a list of RSS feeds to look through. Each feed should appear on its own line. Lines can be commented out with a leading pound/hash sign (#), so you can easily keep track of your feeds. Again, ONLY feeds from http://www.xtvi.com/all_tv_shows should be used. $cookies is a plain text file used to store wget cookies from XTVI. This is required for logging in to XTVI, which is required for automatically downloading torrent files from XTVI. Without a login, the script will run into a captcha, and captchas require Artificial (or Actual) Intelligence to solve. Needless to say, I'm not going to incorporate such silliness into a simple script. Change $user and $pass to your own XTVI creds.