Skip to content

Instantly share code, notes, and snippets.

@scottlingran
Created March 5, 2013 01:13
Show Gist options
  • Save scottlingran/5087213 to your computer and use it in GitHub Desktop.
Save scottlingran/5087213 to your computer and use it in GitHub Desktop.
OzBargain Scraper
require 'net/http'
require 'open-uri'
require 'awesome_print'
require 'nokogiri'
LINK = "http://www.ozbargain.com.au/live"
html = open(LINK).read
noko = Nokogiri::HTML(html)
result = noko.css(".ozblist a").map {|i| i.text}
ap result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment