def links
      return @links.to_a unless @links.nil?
      @links = Set.new
      return [] unless doc

      doc.search('//a[@href]').each do |a|
        u = a['href']
        next if u.nil? || u.empty?
        abs = to_absolute(u) rescue next
        @links << abs if abs && in_domain?(abs)
      end
      @links.to_a
    end
def links
      return @links.to_a unless @links.nil?
      @links = Set.new
      return [] unless doc

      doc.search('//a[@href]').each do |a|
        u = a['href']
        next if u.nil? || u.empty?
        abs = to_absolute(u) rescue next
        @links << abs if abs && in_domain?(abs)
      end
      @links.to_a
    end
Create a new page


 Array of distinct A tag HREFs from the page