ipBS

Use your imagination

Tuesday, March 21, 2006

Regular Expressions for the Azureus RSS Feed plugin

Relating to my post on "How to get your missed TV shows with Azureus and Bittorrent", quite a few people have been showing interest in the regular expressions that I use in my Azureus RSS Feed plugin. One in particular that people seem to have interest in is the regular expression to download all first season, first episodes. I created one that works quite well. The only current caveat is that it doesn't work with the smart history feature, so using it does require some manual intervention now and again. Here is the regular expression I use and how I use it:



Let me break it down for a better understanding of how it works. There are basically six parts to this expression that you can see if you take out the groupings that are contained in parens. The first five of them for different variations of season and episode one and the last excludes certain terms. The first five parts look like (?=.*?\bs01e01\b) separated by a pipe (OR) symbol. If you wish to create another search term simply add in another grouping prepended with the pipe symbol. The new text to search for should be placed between the \b elements like so |(?=.*?\bfind this\b).

The last part of the expression that excludes terms is of the form (?!french|german|swedish).. I am attempting to exclude content in languages that I do not understand. If you wish to add another language, simply append it to the list with a pipe and the string just before the closing paren like so (?!french|german|swedish|klingon)..

Of course this regular expression is not only limited to searching for first seasons and first episodes. You could use it to search for whatever else you want like all HD content.

Caveats: If you use this as one of your RSS Feed filters then you will need to uncheck or turn off the "Smart History" feature. This is because this feature currently watches to make sure you are downloading incremental episodes. Some methods I've tried to avoid duplicates is to first create "Fail" filters for the items I do not want after the item was initially downloaded. I do this by checking the download history tab in the RSS Feed plugin and finding the item in question to see which feed it came from. Then I go to the feed on the status tab and look for the item, it'll have a Matches value of "Done", and then right click and "Create Filter". Set the filter mode to "Fail" and then move it to the top of the filters list. Finally remove the torrent and data from the "My Torrents" view.

The second method I use is to go to the "My Torrents" view and stop the torrent download or seed and then wait for a day or two. The reason for waiting is for the torrent to be pushed off the RSS feed so that it won't be picked up again. After waiting I then delete the torrent and data from my system. This method works for most torrents, but it will take up precious disk space while it is on your system and if the torrent is ever reseeded by someone it'll show up again.



Leave some comments to let everyone know what expressions you use that may also be handy. Keep it clean and don't give show or title specific expressions as this is not a "My Favorite Show" list.

For a good regular expression testing tool check this out:
Rex V: an AJAX Regular EXpression eValuator

3 Comments:

  • At 9:21 AM, Blogger Mark Edwards said…

    Hey,

    this is really useful - could you elaborate a bit more though? I am an Azureus user but am really struggling with the correct config for the rss and the jaza regex string.

    This is what I have so far:

    ^(?=.*?\bBattlestar.Galactica\b)((?!french|german|swedish|720|mkv|HD).)*$
    ^(?=.*?\bHouse\b)((?!french|german|swedish|720|mkv|HD).)*$
    ^(?=.*?\bScrubs\b)((?!french|german|swedish|720|mkv|HD).)*$
    ^(?=.*?\bGrey's.Anatomy\b)((?!french|german|swedish|720|mkv|HD).)*$
    ^(?=.*?\bHeroes\b)((?!french|german|swedish|720|mkv|HD).)*$

    I am sure that this is wrong but could you look over it and see what mistakes I have made?

    I am trying to get only one file type of a particular show.

    I am disappointed as Azureus seems to not be so user friendly in this respect!

    Thanks

     
  • At 10:32 PM, Blogger WhoopJack said…

    What you have appears that it should work, assuming you are putting each line in a separate filter. You could also accomplish the same with a single filter. This will search for each show, excluding the specified languages and formats:

    ^((?=.*?\bBattlestar.Galactica\b)|(?=.*?\bHouse\b)|(?=.*?\bScrubs\b)|(?=.*?\bGreys.Anatomy\b)|(?=.*?\bHeroes\b))((?!french|german|swedish|720|mkv|HD).)*$

     
  • At 3:58 PM, Blogger Unknown said…

    Thanks so much for writing this. Came in handy.

     

Post a Comment

<< Home