Skip to content

Instantly share code, notes, and snippets.

@pzula
Created October 28, 2013 21:54
Show Gist options
  • Save pzula/7205501 to your computer and use it in GitHub Desktop.
Save pzula/7205501 to your computer and use it in GitHub Desktop.
Nokogiri find content in page
require 'nokogiri'
require 'open-uri'
url = "http://www.thebikedepot.org/index.php/about"
page = Nokogiri::HTML(open(url))
page.css('#content-w2').select do |element|
puts
puts element.to_html
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment