Skip to content

Instantly share code, notes, and snippets.

@morganp
Created July 16, 2010 15:51
Show Gist options
  • Save morganp/478517 to your computer and use it in GitHub Desktop.
Save morganp/478517 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'open-uri'
require 'hpricot'
doc = open('http://neohumanism.org/x/x1/x11_color_names.html') {|f| Hpricot(f)}
doc.search('tr').each do |tr|
c = tr.search('td').first
puts c.inner_html unless c.nil?
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment