Sha256: 2b34bc0e2f411486b9e41420da95f649f2272860d114bc4720605f70e5ff0786
Contents?: true
Size: 421 Bytes
Versions: 1
Compression:
Stored size: 421 Bytes
Contents
module Harvestman module Crawler class Fast < Base def crawl(&block) if @pages.nil? crawl_url(@base_url, &block) else threads = [] @pages.each do |p| threads << Thread.new(p) { |page| crawl_url(@base_url.gsub('*', p.to_s), &block) } end threads.each { |t| t.join } end end end register :fast, Fast end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
harvestman-0.1.1 | lib/harvestman/crawler/fast.rb |