Class: DoctorScrape::Scraper::Meta
- Defined in:
- lib/doctor_scrape/scraper/meta.rb
Overview
This class uses the meta tags from the HTML document to get the content
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#doc, #errors?, #fetch, #initialize, #scrape, #url
Constructor Details
This class inherits a constructor from DoctorScrape::Scraper::Base
Instance Method Details
#parse ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/doctor_scrape/scraper/meta.rb', line 7 def parse @data.title = text "DC.title" @data. = text "DC.creator" @data.issued = text "DCTERMS.issued" @data.permalink = doc.xpath("//meta[@scheme='DCTERMS.URI']/@content").text @data.pdf = || pdf_from_link @data.abstract = abstract end |