RequestHandlerResult
Index
Constructors
constructor
- experimental
Parameters
config: Configuration
crawleeStateKey: string
Returns RequestHandlerResult
Properties
addRequests
Type declaration
Parameters
requestsLike: readonly (string | ReadonlyObjectDeep<Partial<RequestOptions<Dictionary>> & { regex?: RegExp; requestsFromUrl?: string }> | ReadonlyObjectDeep<Request<Dictionary>>)[]
optionaloptions: ReadonlyObjectDeep<RequestQueueOperationOptions>
Returns Promise<void>
enqueueLinks
Type declaration
Parameters
optionaloptions: ReadonlyObjectDeep<Omit<EnqueueLinksOptions, requestQueue>>
Returns Promise<unknown>
getKeyValueStore
Type declaration
Parameters
optionalidOrName: string
Returns Promise<Pick<KeyValueStore, id | name | getValue | getAutoSavedValue | setValue>>
pushData
Type declaration
This function allows you to push data to a Dataset specified by name, or the one currently used by the crawler.
Shortcut for
crawler.pushData()
.Parameters
optionaldata: ReadonlyDeep<Dictionary | Dictionary[]>
Data to be pushed to the default dataset.
optionaldatasetIdOrName: string
Returns Promise<void>
useState
Type declaration
Parameters
optionaldefaultValue: State
Returns Promise<State>
Accessors
calls
- experimental
A record of calls to RestrictedCrawlingContext.pushData, RestrictedCrawlingContext.addRequests, RestrictedCrawlingContext.enqueueLinks made by a request handler.
Returns ReadonlyObjectDeep<{ addRequests: [requestsLike: readonly (string | ReadonlyObjectDeep<Partial<RequestOptions<Dictionary>> & { regex?: RegExp; requestsFromUrl?: string }> | ReadonlyObjectDeep<Request<Dictionary>>)[], options?: ReadonlyObjectDeep<RequestQueueOperationOptions>][]; enqueueLinks: [options?: ReadonlyObjectDeep<Omit<EnqueueLinksOptions, requestQueue>>][]; pushData: [data: ReadonlyDeep<Dictionary | Dictionary[]>, datasetIdOrName?: string][] }>
datasetItems
- experimental
Items added to datasets by a request handler.
Returns readonly ReadonlyObjectDeep<{ datasetIdOrName?: string; item: Dictionary }>[]
enqueuedUrlLists
- experimental
URL lists enqueued to the request queue by a request handler via RestrictedCrawlingContext.addRequests using the
requestsFromUrl
option.Returns readonly ReadonlyObjectDeep<{ label?: string; listUrl: string }>[]
enqueuedUrls
- experimental
URLs enqueued to the request queue by a request handler, either via RestrictedCrawlingContext.addRequests or RestrictedCrawlingContext.enqueueLinks
Returns readonly ReadonlyObjectDeep<{ label?: string; url: string }>[]
keyValueStoreChanges
- experimental
A record of changes made to key-value stores by a request handler.
Returns ReadonlyObjectDeep<Record<string, Record<string, { changedValue: unknown; options?: RecordOptions }>>>
A partial implementation of RestrictedCrawlingContext that stores parameters of calls to context methods for later inspection.