Skip to main content
Version: Next

CrawlerAddRequestsResult

Hierarchy

Index

Properties

inheritedaddedRequests

addedRequests: ProcessedRequest[]

inheritedwaitForAllRequestsToBeAdded

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;