Class: Retriever::FetchSitemap
- Defined in:
- lib/retriever/fetchsitemap.rb
Constant Summary
Constants inherited from Fetch
Instance Attribute Summary
Attributes inherited from Fetch
Instance Method Summary collapse
-
#initialize(url, options) ⇒ FetchSitemap
constructor
recieves target URL and RR options returns an array of all unique pages found on the site.
Methods inherited from Fetch
#dump, #errlog, #good_response?, #lg, #start, #write
Constructor Details
#initialize(url, options) ⇒ FetchSitemap
recieves target URL and RR options returns an array of all unique pages found on the site
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/retriever/fetchsitemap.rb', line 6 def initialize(url, ) super start @result.push(@t.target) @result.concat(@link_stack) async_crawl_and_collect # done, make sure progress bar says we are done @progressbar.finish if @progress @result.sort_by! { |x| x.length } if @result.size > 1 @result.uniq! end |