Class: Scraper::Base::PageInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/scraper/base.rb

Overview

Information about the HTML page scraped. A structure with the following attributes:

  • url – The URL of the document being scraped. Passed in the constructor but may have changed if the page was redirected.

  • original_url – The original URL of the document being scraped as passed in the constructor.

  • encoding – The encoding of the document.

  • last_modified – Value of the Last-Modified header returned from the server.

  • etag – Value of the Etag header returned from the server.

Instance Attribute Summary collapse

Instance Attribute Details

#encodingObject

Returns the value of attribute encoding

Returns:

  • (Object)

    the current value of encoding



27
28
29
# File 'lib/scraper/base.rb', line 27

def encoding
  @encoding
end

#etagObject

Returns the value of attribute etag

Returns:

  • (Object)

    the current value of etag



27
28
29
# File 'lib/scraper/base.rb', line 27

def etag
  @etag
end

#last_modifiedObject

Returns the value of attribute last_modified

Returns:

  • (Object)

    the current value of last_modified



27
28
29
# File 'lib/scraper/base.rb', line 27

def last_modified
  @last_modified
end

#original_urlObject

Returns the value of attribute original_url

Returns:

  • (Object)

    the current value of original_url



27
28
29
# File 'lib/scraper/base.rb', line 27

def original_url
  @original_url
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



27
28
29
# File 'lib/scraper/base.rb', line 27

def url
  @url
end