tl2rssPL: Perl TorrentLeech To RSS server

Note: Updated February 22 to add basic support (via a code tweak in tl2rssPL.pm – search for "categories" and update the array for now) for multiple categories

I have used TorrentLeech for my various media needs for nearly two years now. While it's a great site, the RSS feed is nearly always offline so scheduling automatic downloading of things using, for example, FlexGet, becomes impossible.

There was a java program, TL2RSS, which would convert the HTML to an RSS feed and that was awesome, until a site redesign went live and it broke. Despite a half-hearted attempt at getting it running on the new layout, it's been out of commission for nearly a week.

Yesterday I wrote my own version of the HTML -> RSS converter in Perl. It's rudimentary, not the prettiest code, but it works well enough for the purpose. It has the added benefit of using simple regular expressions to identify media available to download so future site layout changes should be simple to implement.

If you're interested in trying it out, grab the latest release from my git repository.

Here's the included README file (as of version 0.11) for your enjoyment:

The idea behind these scripts is to provide a functional RSS feed
from the HTML interface of http://www.torrentleech.org/.

It's based heavily on the functionality of tl2rss (http://tl2rss.firefang.net/)
but that stopped working due to site HTML changes and I don't know
enough Java to get it running again. So here's a Perl version.

This allows the use of software like flexget (http://flexget.com)
to retrive episode lists from TL and automatically download
the torrent file.

INSTALLATION
------------
1. If you're reading this, you've already unpacked the archive;
   that's the hard bit done.
2. Copy the sample.conf.properties file conf.properties
3. Edit conf.properties putting in your TL username/password
   setting the port you wish the server to listen on and finally
   comment out the 'edited=no' field.
4. Run: ./do_login

It should output 'Login successful'. If not, check your username
and password in conf.properties and try again in 15-20 minutes.
(if you put in the wrong details once, it forces a reCaptcha
image to display and this code currently can't handle that.)

5. Configure cron to automatically run 'do_update_torrents' every 30
   minutes. Something like this should work:

*/30 * * * * cd /path/to/tl2rssPL ; ./do_update_torrents

6. Start the rss server:
$  ./server_rss > tl2rssPL.log 2>&1 &

7. Configure your flexget instance to point to 

http://127.0.0.1:$port/rss

   where $port is set in conf.properties. 

My flexget.yml file is configured like so:
------------------------------------------------------
settings:
  series:
    timeframe:
      hours: 5
      quality: 720p
  download: /path/to/download/directory/

feeds:
  torrentleech:
    rss: http://127.0.0.1:8080/rss
    regexp:
      reject:
      - Copyright Material
    series:
      - Program 1
      - Program 2
      - Program 3
     download: /path/to/download/directory/
------------------------------------------------------

TO DO
* Purge torrents older than X days - currently they're maintained on the list
  forever.
* Support multiple categories; only supports TV/Episodes at the moment.
* Improve the RSS feed output.
* Support login when reCaptcha is displayed (if your login fails once, it puts
  up a reCapture; you have to wait 20 minutes or so for that to reset).

Comments are closed.