Skip to content

Instantly share code, notes, and snippets.

@oa414
Created March 10, 2013 10:31
Show Gist options
  • Select an option

  • Save oa414/5128064 to your computer and use it in GitHub Desktop.

Select an option

Save oa414/5128064 to your computer and use it in GitHub Desktop.
require 'nokogiri'
require 'open-uri'
require 'pp'
url = "http://m.fmylife.com/?page=1"
doc = Nokogiri::HTML(open(url))
#pp doc
doc.css("ul.content li p.text").each do |text|
puts text.content
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment