Created
September 19, 2010 22:20
-
-
Save deplorableword/587172 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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