Skip to main content

GenericDelayResolver

Apply delay per time schedule.

Notes​

Applies configurable crawl delays based on time schedules. Supports a default delay, optional time-range-based schedules (by day of week, day of month, or time of day), and an option to ignore the crawl delay specified in robots.txt.

Examples​

The following example set the minimum delay between each document download on a given site to 5 seconds, no matter what the crawler robots.txt may say, excepted on weekend, where it is more agressive (1 second).

class: GenericDelayResolver
defaultDelay: 5000
ignoreRobotsCrawlDelay: true
scope: SITE
schedules:
- dayOfWeekRange:
start: SAT
end: SUN
delay: 1000

Usage​

Full configuration skeleton, with every option and its default
class: GenericDelayResolver
defaultDelay: 0
ignoreRobotsCrawlDelay: false
schedules:
- dayOfMonthRange: {}
dayOfWeekRange: {}
delay: 0
timeRange: {}
scope: CRAWLER

Properties​

PropertyTypeRequiredDefault
defaultDelayintegerNo3000
ignoreRobotsCrawlDelaybooleanNofalse
schedulesDelaySchedule[]No-
scopeenumNoCRAWLER

Property Details​

defaultDelay​

The default delay in milliseconds.

ignoreRobotsCrawlDelay​

By default the crawl delay specified in robots.txt takes precedence over custom settings. Check to disable robot delay instructions.

schedules​

Have different delays at different time.

scope​

The delay scope.

Allowed Values​

  • CRAWLER
  • SITE
  • THREAD