Class: AmazonDeets::MechanizedFragment
- Inherits:
-
Object
- Object
- AmazonDeets::MechanizedFragment
- Defined in:
- lib/amazon_deets/core.rb
Overview
Amazon renders different HTML dependending upon the type of product that you are viewing. This means that the scraper queries need to change depending upon whether you want the data for a Kindle book or some general merchandise. Rather than building one super-complicated scraper, we’ll break the code into multiple simple scrapers that focus on solving specific problems.
Direct Known Subclasses
Instance Method Summary collapse
-
#applicable?(agent) ⇒ Boolean
Decides whether or not this MechanizedFragment is applicable.
- #scrape(agent) ⇒ Object
Instance Method Details
#applicable?(agent) ⇒ Boolean
Decides whether or not this MechanizedFragment is applicable
55 56 57 |
# File 'lib/amazon_deets/core.rb', line 55 def applicable?(agent) raise NotImplementedError end |
#scrape(agent) ⇒ Object
59 60 61 |
# File 'lib/amazon_deets/core.rb', line 59 def scrape(agent) raise NotImplementedError end |