Method: Apollo::Crawler::BaseCrawler#enqueue_url
- Defined in:
- lib/apollo_crawler/crawler/base_crawler.rb
#enqueue_url(url) ⇒ Object
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/apollo_crawler/crawler/base_crawler.rb', line 130 def enqueue_url(url) urls = [] return urls if url.nil? # We support both - list of urls or single url if(url.kind_of?(Array)) urls = urls.concat(url) else urls << url end urls.each do |u| if(url_processed?(u) == false) @backlog << u end end end |