crawlee-one / Exports / CrawleeOneRoute
Route that a request will be sent to if the request doesn't have a label yet,
and if the match
function returns truthy value.
If match
function returns truthy value, the request is passed to the action
function for processing.
NOTE: If multiple records would match the request, then the first record to match a request will process that request.
Name | Type |
---|---|
T |
extends CrawleeOneCtx |
RouterCtx |
extends Record <string , any > = CrawleeOneRouteCtx <T > |
• handler: (ctx
: Omit
<T
["context"
] & RouterCtx
, "request"
> & { request
: Request
<Dictionary
> }) => Awaitable
<void
>
▸ (ctx
): Awaitable
<void
>
Name | Type |
---|---|
ctx |
Omit <T ["context" ] & RouterCtx , "request" > & { request : Request <Dictionary > } |
Awaitable
<void
>
• match: CrawleeOneRouteMatcher
<T
, RouterCtx
>