Skip to main content
Version: 3.11

AddRequestsBatchedResult

Hierarchy

Index

Properties

addedRequests

addedRequests: ProcessedRequest[]

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;