Skip to content

Instantly share code, notes, and snippets.

@deplorableword
Created September 19, 2010 22:20
Show Gist options
  • Save deplorableword/587172 to your computer and use it in GitHub Desktop.
Save deplorableword/587172 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open('http://www.vodkaemporium.com/gin/gin.php'))
product_list = doc.css("#mainContent tr")
product_list.each do |product|
product_title = product.css('a strong')
product_title.each do |title|
if (title.text != 'Add to basket')
puts title.text
end
end
product_price = product.css('td[width="20%"]')
puts product_price.text
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment