-
-
Save smartynko/0072ea84ec2dd7f0844542cbba73dbb1 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' | |
page = Nokogiri::HTML(open("http://v-tac.eu/led-lights/lights1/led-spotlights/led-spotlight-7w-gu10-smd-white-plastic-white-detail.html")) | |
puts page.class # => Nokogiri::HTML::Document | |
fields = page.css(".product-field-type-S") | |
fields.each do |field| | |
key = field.css(".product-fields-title").text | |
value = field.css(".product-field-display").text | |
puts "#{key}: #{value}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment