Created
April 2, 2009 18:24
-
-
Save julesfern/89336 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| puts "WELCOME TO RTWIGGY™" | |
| puts "Enter your search term, sponsored by Framework Du Jour™" | |
| term = gets | |
| puts "---------" | |
| puts "Searching for '#{term.chomp}' on FUCKING TWITTER HOW COOL IS THAT???7" | |
| puts "---------" | |
| document = Nokogiri::XML(open("http://search.twitter.com/search.atom?q=#{term}")) | |
| document.css("entry").to_a[0..4].each do |entry| | |
| puts "==========================" | |
| puts "#{entry.css("author name").first.content} said:" | |
| puts entry.css("title").first.content | |
| puts "==========================" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment