-
Notifications
You must be signed in to change notification settings - Fork 1
Configuration
boooz edited this page May 17, 2012
·
1 revision
You can set Skyscraper configuration in two ways:
- As static method call
>> Skyscraper.config.limit = 10- As class method call
class Sample
include Skyscraper
settings limit: 10, skip_on_error: false
end-
delay: { sleep: 0, after: 1 } Takes an Fixnum number with delay in seconds or hash like this { sleep: 1, after: 1 }, this means Skyscraper will sleep 1 second after each page is fetched.
-
limit: nil Limit of pages which will be fetched by one #fetch call, default: nil
-
noise_errors: true If true Skyscraper will print notice if any error occured
-
skip_on_error: true Skyscraper will continue fetching pages even if some error occured - for example - page not found.
- download_path: "/tmp/skyscraper/:sequence/:file_name" - default download path
- encoding: "utf-8" - default encoding