Created
July 26, 2011 17:45
-
-
Save ignu/1107336 to your computer and use it in GitHub Desktop.
Colbert Report Ticket Notifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'ruby-growl' | |
require 'net/http' | |
comedy_central = Net::HTTP.new('impresario.comedycentral.com', 80) | |
growl = Growl.new "localhost", "ruby-growl", ["Colbert Report Tickets"] | |
growl.notify "Colbert Report Tickets", "Colbert Report Ticket Notifer", "You'll be alerted when tickets are available." | |
while true do | |
unless(comedy_central.get("/show/5b2eb3b0eb99f143", nil).body =~ /there are no tickets available/) | |
growl.notify "Colbert Report Tickets", "New Colbert Report Tickets Available", "Get them now!" | |
end | |
sleep 30 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment