Skip to content

Instantly share code, notes, and snippets.

@abrcoelho
Created February 18, 2013 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abrcoelho/4974460 to your computer and use it in GitHub Desktop.
Save abrcoelho/4974460 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'simple-rss'
url = File.open('ezrss.xml') # XML file from the RSS feed stored locally during development to avoid "too many requests" error.
rss = SimpleRSS.parse open(url)
TVSHOWS = %w[
Alphas
How.I.Met.Your.Mother
Revolution.2012
Touch
]
rss.items.each do |item|
TVSHOWS.each do |tvshow|
if item.link.include?(tvshow)
puts "Downloading torrent file for: #{item.title}"
puts "-----"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment