Skip to content

Instantly share code, notes, and snippets.

@stephenjudkins
Created April 16, 2009 22:15
Show Gist options
  • Save stephenjudkins/96718 to your computer and use it in GitHub Desktop.
Save stephenjudkins/96718 to your computer and use it in GitHub Desktop.
require 'csspool'
require 'pp'
site = Scraper.scrape "http://www.aboutus.org"
doc = site.front_page.doc
style = RealInternet.get('http://www.aboutus.org/support/style.css').body
sac = CSS::SAC::Parser.new
css = sac.parse(style)
a = doc.search("a.logo").first
rules = css.rules_matching(a)
PP.pp rules.first.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment