Sha256: 2cb65f1617b580e34e2f48254f9a1613529b82d647f80bfc5c4e4d148de35a20
Contents?: true
Size: 541 Bytes
Versions: 3
Compression:
Stored size: 541 Bytes
Contents
class Pizza include Scrapify::Base html "http://www.dominos.co.in/menuDetails_ajx.php?catgId=1" attribute :name, css: ".menu_lft li a" attribute :image_url, xpath: "//li//input//@value" attribute :price, css: ".price", regex: /([\d\.]+)/ attribute :ingredients, css: ".ingredients", regex: /contains (\w+)/, array: true attribute :ingredient_urls, css: '.references ol li' do |element| element.children.map do |child| child.attributes['href'].value if child.attributes['href'] end.compact end key :name end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
scrapify-0.0.9 | spec/pizza.rb |
scrapify-0.0.8 | spec/pizza.rb |
scrapify-0.0.7 | spec/pizza.rb |