Sha256: 6b54962192676eb7e6abed6595b9d778d799df6e0456974a597d8ed45d01c754

Contents?: true

Size: 329 Bytes

Versions: 1

Compression:

Stored size: 329 Bytes

Contents

class HackerNews
  include Scrapify::Base
  html "http://news.ycombinator.com/news"

  attribute :rank, css: "tr:nth-child(3n+1) td.title:nth-child(1)"
  attribute :title, css: "tr:nth-child(3n+1) td.title:nth-child(3)"
  attribute :url, xpath: "//tr[position() mod 3 = 1]/td[@class='title'][position()=2]//@href"
  key :rank
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scrapify-0.0.9 examples/hacker_news.rb