Sha256: 44ec56793e0b5902d3fce53905db170e4dd8f603848af4d86cd9ff981a5cb589

Contents?: true

Size: 371 Bytes

Versions: 1

Compression:

Stored size: 371 Bytes

Contents

require 'harvestman'

# Crawl Etsy's electronics category pages (from 1 to 3) and output every item's
# title and price.

base_url = 'http://www.etsy.com/browse/vintage-category/electronics/*'

Harvestman.crawl base_url, (1..3) do
  css "div.listing-hover" do
    title = css "div.title a"
    price = css "span.listing-price"

    puts "* #{title} (#{price})"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
harvestman-0.1.1 examples/etsy.rb