Class: Scrapio::Resources::Crawl
- Inherits:
-
Object
- Object
- Scrapio::Resources::Crawl
- Defined in:
- lib/scrapio/resources/crawl.rb
Instance Method Summary collapse
- #crawl(seeds:, max_pages: nil, max_depth: nil, same_domain_only: nil, output: nil, extract: nil, timeout_ms: nil) ⇒ Object
-
#initialize(http) ⇒ Crawl
constructor
A new instance of Crawl.
Constructor Details
#initialize(http) ⇒ Crawl
Returns a new instance of Crawl.
4 |
# File 'lib/scrapio/resources/crawl.rb', line 4 def initialize(http) = @http = http |
Instance Method Details
#crawl(seeds:, max_pages: nil, max_depth: nil, same_domain_only: nil, output: nil, extract: nil, timeout_ms: nil) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/scrapio/resources/crawl.rb', line 6 def crawl(seeds:, max_pages: nil, max_depth: nil, same_domain_only: nil, output: nil, extract: nil, timeout_ms: nil) @http.post("/v1/crawl", { seeds: seeds, max_pages: max_pages, max_depth: max_depth, same_domain_only: same_domain_only, output: output, extract: extract, timeout_ms: timeout_ms, }) end |