Skip to main content
Version: Next

AddRequestsBatchedResult

Hierarchy

Index

Properties

addedRequests

addedRequests: ProcessedRequest[]

optionalrequestsOverLimit

requestsOverLimit?: Source[]

Requests from the input that were not added to the queue because the maxNewRequests budget was reached. Empty when maxNewRequests is not set.

waitForAllRequestsToBeAdded

waitForAllRequestsToBeAdded: Promise<ProcessedRequest[]>

A promise which will resolve with the rest of the requests that were added to the queue.

Alternatively, we can set waitForAllRequestsToBeAdded to true in the crawler.addRequests() options.

Example:

// Assuming `requests` is a list of requests.
const result = await crawler.addRequests(requests);

// If we want to wait for the rest of the requests to be added to the queue:
await result.waitForAllRequestsToBeAdded;