Skip to content

Latest commit

 

History

History
137 lines (76 loc) · 3.16 KB

PushRequestsOptions.md

File metadata and controls

137 lines (76 loc) · 3.16 KB

crawlee-one / Exports / PushRequestsOptions

Interface: PushRequestsOptions<T>

Type parameters

Name Type
T extends Exclude<CrawlerUrl, string> = Exclude<CrawlerUrl, string>

Table of contents

Properties

Properties

filter

Optional filter: (req: T) => unknown

Type declaration

▸ (req): unknown

Option to filter a request before pushing it to the RequestQueue.

This serves mainly to allow users to filter the requests from actor input UI.

Parameters
Name Type
req T
Returns

unknown

Defined in

src/lib/io/pushRequests.ts:35


io

Optional io: CrawleeOneIO<any, any, object>

Defined in

src/lib/io/pushRequests.ts:12


log

Optional log: Log

Defined in

src/lib/io/pushRequests.ts:13


maxCount

Optional maxCount: number

If set, only at most this many requests will be added to the RequestQueue.

The count is determined from the RequestQueue that's used for the crawler run.

This means that if maxCount is set to 50, but the associated RequestQueue already handled 40 requests, then only 10 new requests will be processed.

Defined in

src/lib/io/pushRequests.ts:23


queueOptions

Optional queueOptions: RequestQueueOperationOptions

Defined in

src/lib/io/pushRequests.ts:40


requestQueueId

Optional requestQueueId: string

ID of the RequestQueue to which the data should be pushed

Defined in

src/lib/io/pushRequests.ts:37


transform

Optional transform: (req: T) => MaybePromise<T>

Type declaration

▸ (req): MaybePromise<T>

Option to freely transform a request before pushing it to the RequestQueue.

This serves mainly to allow users to transform the requests from actor input UI.

Parameters
Name Type
req T
Returns

MaybePromise<T>

Defined in

src/lib/io/pushRequests.ts:29