Skip to content

Instantly share code, notes, and snippets.

@nathanclark
Created March 24, 2010 22:50
Show Gist options
  • Save nathanclark/342926 to your computer and use it in GitHub Desktop.
Save nathanclark/342926 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'nokogiri'
require 'open-uri'
# Get a Nokogiri::HTML:Document for the page we’re interested in...
client = "FOOOOOOOOO"
doc = Nokogiri::HTML(open("http://www.facebook.com/#{client}?v=wall",'User-Agent' => 'Mozilla/5.0 (...) Firefox/3.0.6'))
####
# Search for nodes by css
doc.css('.UIStory_Message').each do |link|
puts link.content
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment