Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created March 9, 2009 20:46
Show Gist options
  • Select an option

  • Save tenderlove/76467 to your computer and use it in GitHub Desktop.

Select an option

Save tenderlove/76467 to your computer and use it in GitHub Desktop.
doc = Nokogiri::parse(open(ARGV[0], "r:utf-8").read, nil, 'UTF-8')
doc.search('a').each do |el|
p el
if el['href'] =~ /blah.com/
puts "HERE"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment