How to download torrents without leaving Google Reader - a way for the lazy

Introduction


I actively use the Google Reader service to read RSS feeds in general and to track the appearance of distributions of interest to me on torrent trackers in particular. And also I often download favorite TV shows from torrents. At some point, I wanted to get rid of the intermediate steps between watching a channel record and downloading a torrent and automating the process of catching interesting and necessary information from the network a little.

It is unlikely that anyone will find it a revelation that, if not all, then almost all modern torrent clients support downloading RSS feeds and even automatically downloading torrents from these channels. But, as a rule, I simply do not need most of the distributions given out by a certain channel. And the disk space is far from rubber and it is not possible to deflate all possible distributions of a loved one, for example, a series. I’m not so big a fan to keep several versions of the same series or movie on disks at the same time.

At this point, an attentive reader will certainly notice: because you can configure filters for every RSS feed using a torrent client and pump out only those distributions that are of real interest. He will notice and get a reasonable, in my opinion, answer: you cannot configure filters for all occasions. Need a more versatile option.

This option for me was the automatic download of distributions marked in Google Reader. About how to implement this with improvised means, described under the cut.

Designer Details


To successfully solve the problem, we need:
  • installed and functional rtorrent with rutorrent as a front-end and the following plugins: RSS , RSSURLRewrite and LoginMgr (the latter serves to download distributions from torrent trackers that require authorization and are generally optional, but needed for my example).
  • Subscribe to Google Reader for the desired RSS feeds
  • miracle yudo fish-service Yahoo Pipes
  • some time

Step one - configure the output of all entries marked in Google Reader to a separate channel


In order for the list of marked entries to be accessible from outside Google Reader, you must make such entries shared. To do this, open the Google Reader settings and in the "Folders and Tags" menu with one click turn personal records
Folders and Tags
into public
Folders and Tags
If for some reason you don’t want to make “Your marked entries” common, all further operations can be done with entries that are in the “Your shared entries” list.

Next, open the page with the marked entries by clicking on the link “see open page” opposite the corresponding public folder and copy the URL of the channel with the marked entries:
Shared Posts Page
It has the following form:
http://www.google.com/reader/public/atom/user/%googleuserid%/state/com.google/starred

And everything would be fine, only Reader can only give the result in the format of an Atom feed, and existing plugins for rutorrent successfully work only with RSS. Here we will use Yahoo Pipes.

Step two - convert atom to RSS


Yahoo Pipes requires registration, but this will not be a big deal, as authorization is possible with an existing Google account and we need only once to create the corresponding pipe.
We will consider this and subsequent steps using RuTracker.org as an example.
In order not to delve into the study of this, frankly, very powerful service, we clone a simple pipe semi-finished product created for this purpose. In it, you will need to specify a link to the atom channel and configure a filter that will filter out obviously unnecessary records (in this case, not containing distribution links), but first things first:
  • open http://pipes.yahoo.com/pipes/
  • Sign In -> Sign in with Google (of course, you can choose any other available authentication option)
  • open the prepared pipe semi-finished product
  • click clone
  • edit fields with a name, description and link to the pipe to taste
  • open the editor by clicking on the Edit Source button
  • enter the URL obtained in the previous step into the field of the same name in the Fetch Feed block
Yahoo pipes
In the Filter block, you can configure flexible filtering of messages of the source channel using a considerable number of proposed filters. Notice the Debugger area at the bottom of the screen. In it, you can evaluate the output of any of the pipe blocks.
  • Save our pipe with the Save button, start it (Run Pipe ...).
Pipe Result
From a bunch of delivery options, we are interested in displaying the results in the form of an RSS feed:
http://pipes.yahoo.com/pipes/pipe.run?_id=%SomeId%&_render=rss

This channel can already be fed rtorrent and configure the download of torrents. Its updating occurs automatically at certain intervals ( they say , depending on the HTTP headers of the source), therefore, additional intervention for its successful operation is not required.

Step Three - Configure rtorrent, Enable Distribution, and Configure Distribution Download Rules


Since RuTracker.org serves us as a test subject, the first thing you need to do is specify a username and password in the settings to access it:
Enter username and password

Then we add the RSS feed to rutorrent: We configure the
Add newsletter

rules for converting the distribution URL into the torrent file URL, remembering to select the mailing list to which you need to apply the rule:
Editing the rules

For RuTracker.org this is a replacement for the expression
| http: //rutracker.org/forum/viewtopic.php \? t = (\ d +) | i
per line
http://dl.rutracker.org/forum/dl.php?t=${1}

We set the settings as desired:
We set the settings

Final step - check


We go to Google Reader, mark the entry:
Google reader

Wait (we can update the newsletter in rutorrent manually, but the information about the marked entries is not updated instantly (see above); the auto-update interval of 30 minutes is enough for the experiment to be successful).

We see in rutorrent freshly marked distributions:
Bingo!

Instead of a conclusion


Having spent half an hour of free time, we get the opportunity to download downloads that are of interest to us with just one click of the mouse, having access only to Google Reader. All routine operations will be done for us by powerful services in conjunction with the home server.
The advantages to this approach include:
  • lack of need for direct access to the server with the installed torrent client (and, as a result, lack of need for a "white" external IP, and indeed an external IP)
  • adding downloads to the queue is organically combined with daily reading of the latest news
The minus is the relatively large period of time between the record mark in Google Reader and the start of downloading (practice shows that 3-5 minutes elapse between the first and second), which, in general, is not critical in the intended use case.

Related links:
.
UPD: If you want to give (and already put) a negative assessment to the article, please take the trouble to argue your decision in the comments.

Also popular now: