Interface

Task

Task

Task holds information to execute. This is non-spawned task structure as an object.

View Source index.ts, line 145

Members

AttempRule

# attempts Optional

retries or [retries, allowedStatuses, callback({ err, shouldRetry, task, crawler })]. Rule for plugin-attempt

View Source index.ts, line 229

function

# callback Optional

Callback function. Called before resolving the task.

View Source index.ts, line 155

true

# cancel Optional

Setting cancel to true will make crawler stop the execution of the task immediately.

View Source index.ts, line 173

number

# delay Optional

delay in ms for plugin-delay.

View Source index.ts, line 210

Error

# err Optional

Error hooked after an error throwed during http request.

View Source index.ts, line 185

FollowRule

# follow Optional

rule for plugin-follow: [selector, taskFactoryFunc, filter=urls=>urls.filter(v=>v)]. workflow:selector-parse => filterFunction => taskFactoryFunc for each

View Source index.ts, line 216

FollowRules

# follows Optional

set of rules for plugin-follow.

View Source index.ts, line 223

TaskMeta

# meta Optional

Meta object for task.

View Source index.ts, line 161

any

# parse Optional

parsing rule for plugin-parse.

View Source index.ts, line 191

function

# parseCheck Optional

check before parsing if it exists, return true if you want to continue the parsing execution

View Source index.ts, line 197

any

# parsed Optional

parsed result from plugin-parse.

View Source index.ts, line 204

number

# priority Optional

Task with higher priority will be executed first.

View Source index.ts, line 167

Response

# res Optional

Response hooked after http request. See got

View Source index.ts, line 179

string

# url

Url for http request.

View Source index.ts, line 150