Skip to content

Instantly share code, notes, and snippets.

@toothrot
Created June 15, 2009 01:05
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 toothrot/129885 to your computer and use it in GitHub Desktop.
Save toothrot/129885 to your computer and use it in GitHub Desktop.
#!/home/arakoczy/local/bin/ruby
require 'rubygems'
require 'cgi'
require 'open-uri'
require 'hpricot'
query = CGI.escape(ARGV.shift)
puts (Hpricot(open("http://google.com/search?q=#{query}"))%('.r b')).innerHTML
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment