Skip to content

Instantly share code, notes, and snippets.

@krasnoukhov
Created May 24, 2013 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save krasnoukhov/5643670 to your computer and use it in GitHub Desktop.
Save krasnoukhov/5643670 to your computer and use it in GitHub Desktop.
BIO ENERGY
require "open-uri"
require "nokogiri"
contents = open("http://bio-energy.com.ua/index.php?option=com_marketplace&page=show_category&catid=3&Itemid=0").read
doc = Nokogiri::HTML(contents)
items = doc.css(".jooNormal").map do |item|
{
image: item.css("td").first.css("img").first.attributes["src"].value,
title: item.css("td").first.css("td").at(2).css("a").first.text
}
end
# YOLO
puts items
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment