Class: Pikuri::Tool::Scraper::Simple::Fetched

Inherits:
Data
  • Object
show all
Defined in:
lib/pikuri/tool/scraper/simple.rb

Overview

Result of a successful fetch: the response body, the normalized content-type (lower-cased, with any ; charset=… parameters stripped), and the final URL after redirects. The final URL is kept so future scrapers can resolve relative links against the actual landing page rather than the originally requested one.

Instance Attribute Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



57
58
59
# File 'lib/pikuri/tool/scraper/simple.rb', line 57

def body
  @body
end

#content_typeObject (readonly)

Returns the value of attribute content_type

Returns:

  • (Object)

    the current value of content_type



57
58
59
# File 'lib/pikuri/tool/scraper/simple.rb', line 57

def content_type
  @content_type
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



57
58
59
# File 'lib/pikuri/tool/scraper/simple.rb', line 57

def url
  @url
end