Sha256: bc5a6276652b8a24dde783a0b76a0c4137297f6d01539b88f9ea02fc03488ed8

Contents?: true

Size: 746 Bytes

Versions: 3

Compression:

Stored size: 746 Bytes

Contents

module Retriever
	class FetchSEO < Fetch
		def initialize(url,options) #recieves target url and RR options, returns an array of onpage SEO related fields on all unique pages found on the site
			super
			@data = []
			page_one = Retriever::Page.new(@t.source,@t)
			@linkStack = page_one.parseInternalVisitable
			lg("URL Crawled: #{@t.target}")
			lg("#{@linkStack.size-1} new links found")

			@data.push(page_one.parseSEO)
			lg("#{@data.size} pages scraped")
			errlog("Bad URL -- #{@t.target}") if !@linkStack

			@linkStack.delete(@t.target) if @linkStack.include?(@t.target)
			@linkStack = @linkStack.take(@maxPages) if (@linkStack.size+1 > @maxPages)

			self.async_crawl_and_collect()

			@data.sort_by! {|x| x[0].length}
		end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubyretriever-1.0.3 lib/retriever/fetchseo.rb
rubyretriever-1.0.2 lib/retriever/fetchseo.rb
rubyretriever-1.0.1 lib/retriever/fetchseo.rb