# File lib/scraper/base.rb, line 715
715:     def initialize(source, options = nil)
716:       @page_info = PageInfo[]
717:       @options = options || {}
718:       case source
719:       when URI
720:         @document = source
721:       when String, HTML::Node
722:         @document = source
723:         # TODO: document and test case these two.
724:         @page_info.url = @page_info.original_url = @options[:url]
725:         @page_info.encoding = @options[:encoding]
726:       else
727:         raise ArgumentError, "Can only scrape URI, String or HTML::Node"
728:       end
729:     end