def links
      # Find all anchor elements
      doc.xpath('//a').map do |element|
        # extract all the href attributes
        element.attribute('href')
      end.compact.map(&:value).map do |href|
        # return them as new document objects
        Snapshotify::Document.new(href, url)
      end.compact
    end
def links
      # Find all anchor elements
      doc.xpath('//a').map do |element|
        # extract all the href attributes
        element.attribute('href')
      end.compact.map(&:value).map do |href|
        # return them as new document objects
        Snapshotify::Document.new(href, url)
      end.compact
    end
Initialize the document with a URL, and
 the parent page this URL was included on in case of
 assets
 Find the links in a page and extract all the hrefs