@crawlee/basic 4.0.0-beta.3 → 4.0.0-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/internals/basic-crawler.d.ts +204 -86
- package/internals/basic-crawler.d.ts.map +1 -1
- package/internals/basic-crawler.js +504 -269
- package/internals/basic-crawler.js.map +1 -1
- package/internals/send-request.d.ts +3 -5
- package/internals/send-request.d.ts.map +1 -1
- package/internals/send-request.js +20 -25
- package/internals/send-request.js.map +1 -1
- package/package.json +6 -6
- package/internals/constants.d.ts +0 -7
- package/internals/constants.d.ts.map +0 -1
- package/internals/constants.js +0 -7
- package/internals/constants.js.map +0 -1
- package/tsconfig.build.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
<small>A web scraping and browser automation library</small>
|
|
10
10
|
</h1>
|
|
11
11
|
|
|
12
|
+
<p align=center>
|
|
13
|
+
<a href="https://trendshift.io/repositories/5179" target="_blank"><img src="https://trendshift.io/api/badge/repositories/5179" alt="apify%2Fcrawlee | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
12
16
|
<p align=center>
|
|
13
17
|
<a href="https://www.npmjs.com/package/@crawlee/core" rel="nofollow"><img src="https://img.shields.io/npm/v/@crawlee/core.svg" alt="NPM latest version" data-canonical-src="https://img.shields.io/npm/v/@crawlee/core/next.svg" style="max-width: 100%;"></a>
|
|
14
18
|
<a href="https://www.npmjs.com/package/@crawlee/core" rel="nofollow"><img src="https://img.shields.io/npm/dm/@crawlee/core.svg" alt="Downloads" data-canonical-src="https://img.shields.io/npm/dm/@crawlee/core.svg" style="max-width: 100%;"></a>
|
|
@@ -24,7 +28,7 @@ Crawlee is available as the [`crawlee`](https://www.npmjs.com/package/crawlee) N
|
|
|
24
28
|
|
|
25
29
|
> 👉 **View full documentation, guides and examples on the [Crawlee project website](https://crawlee.dev)** 👈
|
|
26
30
|
|
|
27
|
-
>
|
|
31
|
+
> Do you prefer 🐍 Python instead of JavaScript? [👉 Checkout Crawlee for Python 👈](https://github.com/apify/crawlee-python).
|
|
28
32
|
|
|
29
33
|
## Installation
|
|
30
34
|
|
package/index.d.ts
CHANGED
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC"}
|
|
@@ -1,38 +1,13 @@
|
|
|
1
|
-
import type { AddRequestsBatchedOptions, AddRequestsBatchedResult, AutoscaledPoolOptions,
|
|
2
|
-
import { AutoscaledPool,
|
|
3
|
-
import type { Awaitable, BatchAddRequestsResult, Dictionary, SetStatusMessageOptions } from '@crawlee/types';
|
|
1
|
+
import type { AddRequestsBatchedOptions, AddRequestsBatchedResult, AutoscaledPoolOptions, Configuration, CrawleeLogger, CrawlingContext, DatasetExportOptions, EnqueueLinksOptions, EventManager, FinalStatistics, GetUserDataFromRequest, IRequestList, IRequestManager, ProxyConfiguration, Request, RequestsLike, RouterHandler, RouterRoutes, Session, SessionPoolOptions, SkippedRequestCallback, Source, StatisticsOptions, StatisticState } from '@crawlee/core';
|
|
2
|
+
import { AutoscaledPool, ContextPipeline, Dataset, RequestProvider, SessionPool, Statistics } from '@crawlee/core';
|
|
3
|
+
import type { Awaitable, BaseHttpClient, BatchAddRequestsResult, Dictionary, ProxyInfo, SetStatusMessageOptions, StorageClient } from '@crawlee/types';
|
|
4
4
|
import { RobotsTxtFile } from '@crawlee/utils';
|
|
5
|
-
import type { SetRequired } from 'type-fest';
|
|
6
|
-
import type { Log } from '@apify/log';
|
|
5
|
+
import type { ReadonlyDeep, SetRequired } from 'type-fest';
|
|
7
6
|
import { TimeoutError } from '@apify/timeout';
|
|
8
|
-
export interface BasicCrawlingContext<UserData extends Dictionary = Dictionary> extends CrawlingContext<
|
|
9
|
-
/**
|
|
10
|
-
* This function automatically finds and enqueues links from the current page, adding them to the {@link RequestQueue}
|
|
11
|
-
* currently used by the crawler.
|
|
12
|
-
*
|
|
13
|
-
* Optionally, the function allows you to filter the target links' URLs using an array of globs or regular expressions
|
|
14
|
-
* and override settings of the enqueued {@link Request} objects.
|
|
15
|
-
*
|
|
16
|
-
* Check out the [Crawl a website with relative links](https://crawlee.dev/js/docs/examples/crawl-relative-links) example
|
|
17
|
-
* for more details regarding its usage.
|
|
18
|
-
*
|
|
19
|
-
* **Example usage**
|
|
20
|
-
*
|
|
21
|
-
* ```ts
|
|
22
|
-
* async requestHandler({ enqueueLinks }) {
|
|
23
|
-
* await enqueueLinks({
|
|
24
|
-
* urls: [...],
|
|
25
|
-
* });
|
|
26
|
-
* },
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @param [options] All `enqueueLinks()` parameters are passed via an options object.
|
|
30
|
-
* @returns Promise that resolves to {@link BatchAddRequestsResult} object.
|
|
31
|
-
*/
|
|
32
|
-
enqueueLinks(options?: SetRequired<EnqueueLinksOptions, 'urls'>): Promise<BatchAddRequestsResult>;
|
|
7
|
+
export interface BasicCrawlingContext<UserData extends Dictionary = Dictionary> extends CrawlingContext<UserData> {
|
|
33
8
|
}
|
|
34
|
-
export type RequestHandler<Context extends CrawlingContext =
|
|
35
|
-
export type ErrorHandler<Context extends CrawlingContext =
|
|
9
|
+
export type RequestHandler<Context extends CrawlingContext = CrawlingContext> = (inputs: Context) => Awaitable<void>;
|
|
10
|
+
export type ErrorHandler<Context extends CrawlingContext = CrawlingContext, ExtendedContext extends Context = Context> = (inputs: Context & Partial<ExtendedContext>, error: Error) => Awaitable<void>;
|
|
36
11
|
export interface StatusMessageCallbackParams<Context extends CrawlingContext = BasicCrawlingContext, Crawler extends BasicCrawler<any> = BasicCrawler<Context>> {
|
|
37
12
|
state: StatisticState;
|
|
38
13
|
crawler: Crawler;
|
|
@@ -40,7 +15,10 @@ export interface StatusMessageCallbackParams<Context extends CrawlingContext = B
|
|
|
40
15
|
message: string;
|
|
41
16
|
}
|
|
42
17
|
export type StatusMessageCallback<Context extends CrawlingContext = BasicCrawlingContext, Crawler extends BasicCrawler<any> = BasicCrawler<Context>> = (params: StatusMessageCallbackParams<Context, Crawler>) => Awaitable<void>;
|
|
43
|
-
export
|
|
18
|
+
export type RequireContextPipeline<DefaultContextType extends CrawlingContext, FinalContextType extends DefaultContextType> = DefaultContextType extends FinalContextType ? {} : {
|
|
19
|
+
contextPipelineBuilder: () => ContextPipeline<CrawlingContext, FinalContextType>;
|
|
20
|
+
};
|
|
21
|
+
export interface BasicCrawlerOptions<Context extends CrawlingContext = CrawlingContext, ContextExtension = Dictionary<never>, ExtendedContext extends Context = Context & ContextExtension> {
|
|
44
22
|
/**
|
|
45
23
|
* User-provided function that performs the logic of the crawler. It is called for each URL to crawl.
|
|
46
24
|
*
|
|
@@ -58,7 +36,35 @@ export interface BasicCrawlerOptions<Context extends CrawlingContext = BasicCraw
|
|
|
58
36
|
* The exceptions are logged to the request using the
|
|
59
37
|
* {@link Request.pushErrorMessage|`Request.pushErrorMessage()`} function.
|
|
60
38
|
*/
|
|
61
|
-
requestHandler?: RequestHandler<
|
|
39
|
+
requestHandler?: RequestHandler<ExtendedContext>;
|
|
40
|
+
/**
|
|
41
|
+
* Allows the user to extend the crawling context passed to the request handler with custom functionality.
|
|
42
|
+
*
|
|
43
|
+
* **Example usage:**
|
|
44
|
+
*
|
|
45
|
+
* ```javascript
|
|
46
|
+
* import { BasicCrawler } from 'crawlee';
|
|
47
|
+
*
|
|
48
|
+
* // Create a crawler instance
|
|
49
|
+
* const crawler = new BasicCrawler({
|
|
50
|
+
* extendContext(context) => ({
|
|
51
|
+
* async customHelper() {
|
|
52
|
+
* await context.pushData({ url: context.request.url })
|
|
53
|
+
* }
|
|
54
|
+
* }),
|
|
55
|
+
* async requestHandler(context) {
|
|
56
|
+
* await context.customHelper();
|
|
57
|
+
* },
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
extendContext?: (context: Context) => Awaitable<ContextExtension>;
|
|
62
|
+
/**
|
|
63
|
+
* *Intended for BasicCrawler subclasses*. Prepares a context pipeline that transforms the initial crawling context into the shape given by the `Context` type parameter.
|
|
64
|
+
*
|
|
65
|
+
* The option is not required if your crawler subclass does not extend the crawling context with custom information or helpers.
|
|
66
|
+
*/
|
|
67
|
+
contextPipelineBuilder?: () => ContextPipeline<CrawlingContext, Context>;
|
|
62
68
|
/**
|
|
63
69
|
* Static list of URLs to be processed.
|
|
64
70
|
* If not provided, the crawler will open the default request queue when the {@link BasicCrawler.addRequests|`crawler.addRequests()`} function is called.
|
|
@@ -73,6 +79,13 @@ export interface BasicCrawlerOptions<Context extends CrawlingContext = BasicCraw
|
|
|
73
79
|
* it is a shortcut for running `crawler.addRequests()` before the `crawler.run()`.
|
|
74
80
|
*/
|
|
75
81
|
requestQueue?: RequestProvider;
|
|
82
|
+
/**
|
|
83
|
+
* Allows explicitly configuring a request manager. Mutually exclusive with the `requestQueue` and `requestList` options.
|
|
84
|
+
*
|
|
85
|
+
* This enables explicitly configuring the crawler to use `RequestManagerTandem`, for instance.
|
|
86
|
+
* If using this, the type of `BasicCrawler.requestQueue` may not be fully compatible with the `RequestProvider` class.
|
|
87
|
+
*/
|
|
88
|
+
requestManager?: IRequestManager;
|
|
76
89
|
/**
|
|
77
90
|
* Timeout in which the function passed as {@link BasicCrawlerOptions.requestHandler|`requestHandler`} needs to finish, in seconds.
|
|
78
91
|
* @default 60
|
|
@@ -87,7 +100,7 @@ export interface BasicCrawlerOptions<Context extends CrawlingContext = BasicCraw
|
|
|
87
100
|
* Second argument is the `Error` instance that
|
|
88
101
|
* represents the last error thrown during processing of the request.
|
|
89
102
|
*/
|
|
90
|
-
errorHandler?: ErrorHandler<
|
|
103
|
+
errorHandler?: ErrorHandler<CrawlingContext, ExtendedContext>;
|
|
91
104
|
/**
|
|
92
105
|
* A function to handle requests that failed more than {@link BasicCrawlerOptions.maxRequestRetries|`maxRequestRetries`} times.
|
|
93
106
|
*
|
|
@@ -96,7 +109,7 @@ export interface BasicCrawlerOptions<Context extends CrawlingContext = BasicCraw
|
|
|
96
109
|
* Second argument is the `Error` instance that
|
|
97
110
|
* represents the last error thrown during processing of the request.
|
|
98
111
|
*/
|
|
99
|
-
failedRequestHandler?: ErrorHandler<
|
|
112
|
+
failedRequestHandler?: ErrorHandler<CrawlingContext, ExtendedContext>;
|
|
100
113
|
/**
|
|
101
114
|
* Specifies the maximum number of retries allowed for a request if its processing fails.
|
|
102
115
|
* This includes retries due to navigation errors or errors thrown from user-supplied functions
|
|
@@ -126,12 +139,18 @@ export interface BasicCrawlerOptions<Context extends CrawlingContext = BasicCraw
|
|
|
126
139
|
* > *NOTE:* In cases of parallel crawling, the actual number of pages visited might be slightly higher than this value.
|
|
127
140
|
*/
|
|
128
141
|
maxRequestsPerCrawl?: number;
|
|
142
|
+
/**
|
|
143
|
+
* Maximum depth of the crawl. If not set, the crawl will continue until all requests are processed.
|
|
144
|
+
* Setting this to `0` will only process the initial requests, skipping all links enqueued by `crawlingContext.enqueueLinks` and `crawlingContext.addRequests`.
|
|
145
|
+
* Passing `1` will process the initial requests and all links enqueued by `crawlingContext.enqueueLinks` and `crawlingContext.addRequests` in the handler for initial requests.
|
|
146
|
+
*/
|
|
147
|
+
maxCrawlDepth?: number;
|
|
129
148
|
/**
|
|
130
149
|
* Custom options passed to the underlying {@link AutoscaledPool} constructor.
|
|
131
150
|
* > *NOTE:* The {@link AutoscaledPoolOptions.runTaskFunction|`runTaskFunction`}
|
|
132
|
-
* and
|
|
133
|
-
*
|
|
134
|
-
*
|
|
151
|
+
* option is provided by the crawler and cannot be overridden.
|
|
152
|
+
* However, we can provide custom implementations of {@link AutoscaledPoolOptions.isFinishedFunction|`isFinishedFunction`}
|
|
153
|
+
* and {@link AutoscaledPoolOptions.isTaskReadyFunction|`isTaskReadyFunction`}.
|
|
135
154
|
*/
|
|
136
155
|
autoscaledPoolOptions?: AutoscaledPoolOptions;
|
|
137
156
|
/**
|
|
@@ -199,15 +218,22 @@ export interface BasicCrawlerOptions<Context extends CrawlingContext = BasicCraw
|
|
|
199
218
|
/**
|
|
200
219
|
* If set to `true`, the crawler will automatically try to fetch the robots.txt file for each domain,
|
|
201
220
|
* and skip those that are not allowed. This also prevents disallowed URLs to be added via `enqueueLinks`.
|
|
221
|
+
*
|
|
222
|
+
* If an object is provided, it may contain a `userAgent` property to specify which user-agent
|
|
223
|
+
* should be used when checking the robots.txt file. If not provided, the default user-agent `*` will be used.
|
|
202
224
|
*/
|
|
203
|
-
respectRobotsTxtFile?: boolean
|
|
225
|
+
respectRobotsTxtFile?: boolean | {
|
|
226
|
+
userAgent?: string;
|
|
227
|
+
};
|
|
204
228
|
/**
|
|
205
229
|
* When a request is skipped for some reason, you can use this callback to act on it.
|
|
206
|
-
* This is currently fired
|
|
230
|
+
* This is currently fired for requests skipped
|
|
231
|
+
* 1. based on robots.txt file,
|
|
232
|
+
* 2. because they don't match enqueueLinks filters,
|
|
233
|
+
* 3. because they are redirected to a URL that doesn't match the enqueueLinks strategy,
|
|
234
|
+
* 4. or because the {@link BasicCrawlerOptions.maxRequestsPerCrawl|`maxRequestsPerCrawl`} limit has been reached
|
|
207
235
|
*/
|
|
208
236
|
onSkippedRequest?: SkippedRequestCallback;
|
|
209
|
-
/** @internal */
|
|
210
|
-
log?: Log;
|
|
211
237
|
/**
|
|
212
238
|
* Enables experimental features of Crawlee, which can alter the behavior of the crawler.
|
|
213
239
|
* WARNING: these options are not guaranteed to be stable and may change or be removed at any time.
|
|
@@ -223,6 +249,43 @@ export interface BasicCrawlerOptions<Context extends CrawlingContext = BasicCraw
|
|
|
223
249
|
* Defaults to a new instance of {@link GotScrapingHttpClient}
|
|
224
250
|
*/
|
|
225
251
|
httpClient?: BaseHttpClient;
|
|
252
|
+
/**
|
|
253
|
+
* If set, the crawler will be configured for all connections to use
|
|
254
|
+
* the Proxy URLs provided and rotated according to the configuration.
|
|
255
|
+
*/
|
|
256
|
+
proxyConfiguration?: ProxyConfiguration;
|
|
257
|
+
/**
|
|
258
|
+
* Custom configuration to use for this crawler.
|
|
259
|
+
* If provided, the crawler will use its own ServiceLocator instance instead of the global one.
|
|
260
|
+
*/
|
|
261
|
+
configuration?: Configuration;
|
|
262
|
+
/**
|
|
263
|
+
* Custom storage client to use for this crawler.
|
|
264
|
+
* If provided, the crawler will use its own ServiceLocator instance instead of the global one.
|
|
265
|
+
*/
|
|
266
|
+
storageClient?: StorageClient;
|
|
267
|
+
/**
|
|
268
|
+
* Custom event manager to use for this crawler.
|
|
269
|
+
* If provided, the crawler will use its own ServiceLocator instance instead of the global one.
|
|
270
|
+
*/
|
|
271
|
+
eventManager?: EventManager;
|
|
272
|
+
/**
|
|
273
|
+
* Custom logger to use for this crawler.
|
|
274
|
+
* If provided, the crawler will use its own ServiceLocator instance instead of the global one.
|
|
275
|
+
*/
|
|
276
|
+
logger?: CrawleeLogger;
|
|
277
|
+
/**
|
|
278
|
+
* A unique identifier for the crawler instance. This ID is used to isolate the state returned by
|
|
279
|
+
* {@link BasicCrawler.useState|`crawler.useState()`} from other crawler instances.
|
|
280
|
+
*
|
|
281
|
+
* When multiple crawler instances use `useState()` without an explicit `id`, they will share the same
|
|
282
|
+
* state object for backward compatibility. A warning will be logged in this case.
|
|
283
|
+
*
|
|
284
|
+
* To ensure each crawler has its own isolated state that also persists across script restarts
|
|
285
|
+
* (e.g., during Apify migrations), provide a stable, unique ID for each crawler instance.
|
|
286
|
+
*
|
|
287
|
+
*/
|
|
288
|
+
id?: string;
|
|
226
289
|
}
|
|
227
290
|
/**
|
|
228
291
|
* A set of options that you can toggle to enable experimental features in Crawlee.
|
|
@@ -303,9 +366,14 @@ export interface CrawlerExperiments {
|
|
|
303
366
|
* ```
|
|
304
367
|
* @category Crawlers
|
|
305
368
|
*/
|
|
306
|
-
export declare class BasicCrawler<Context extends CrawlingContext =
|
|
307
|
-
|
|
369
|
+
export declare class BasicCrawler<Context extends CrawlingContext = CrawlingContext, ContextExtension = Dictionary<never>, ExtendedContext extends Context = Context & ContextExtension> {
|
|
370
|
+
#private;
|
|
308
371
|
protected static readonly CRAWLEE_STATE_KEY = "CRAWLEE_STATE";
|
|
372
|
+
/**
|
|
373
|
+
* Tracks crawler instances that accessed shared state without having an explicit id.
|
|
374
|
+
* Used to detect and warn about multiple crawlers sharing the same state.
|
|
375
|
+
*/
|
|
376
|
+
private static useStateCrawlerIds;
|
|
309
377
|
/**
|
|
310
378
|
* A reference to the underlying {@link Statistics} class that collects and logs run statistics for requests.
|
|
311
379
|
*/
|
|
@@ -321,6 +389,10 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
321
389
|
* Only available if used by the crawler.
|
|
322
390
|
*/
|
|
323
391
|
requestQueue?: RequestProvider;
|
|
392
|
+
/**
|
|
393
|
+
* The main request-handling component of the crawler. It's initialized during the crawler startup.
|
|
394
|
+
*/
|
|
395
|
+
protected requestManager?: IRequestManager;
|
|
324
396
|
/**
|
|
325
397
|
* A reference to the underlying {@link SessionPool} class that manages the crawler's {@link Session|sessions}.
|
|
326
398
|
* Only available if used by the crawler.
|
|
@@ -334,40 +406,58 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
334
406
|
* or to abort it by calling {@link AutoscaledPool.abort|`autoscaledPool.abort()`}.
|
|
335
407
|
*/
|
|
336
408
|
autoscaledPool?: AutoscaledPool;
|
|
409
|
+
/**
|
|
410
|
+
* A reference to the underlying {@link ProxyConfiguration} class that manages the crawler's proxies.
|
|
411
|
+
* Only available if used by the crawler.
|
|
412
|
+
*/
|
|
413
|
+
proxyConfiguration?: ProxyConfiguration;
|
|
337
414
|
/**
|
|
338
415
|
* Default {@link Router} instance that will be used if we don't specify any {@link BasicCrawlerOptions.requestHandler|`requestHandler`}.
|
|
339
416
|
* See {@link Router.addHandler|`router.addHandler()`} and {@link Router.addDefaultHandler|`router.addDefaultHandler()`}.
|
|
340
417
|
*/
|
|
341
|
-
readonly router: RouterHandler<
|
|
418
|
+
readonly router: RouterHandler<Context>;
|
|
419
|
+
private contextPipelineBuilder;
|
|
420
|
+
private _contextPipeline?;
|
|
421
|
+
get contextPipeline(): ContextPipeline<CrawlingContext, ExtendedContext>;
|
|
342
422
|
running: boolean;
|
|
343
423
|
hasFinishedBefore: boolean;
|
|
344
|
-
|
|
345
|
-
protected requestHandler: RequestHandler<
|
|
346
|
-
protected errorHandler?: ErrorHandler<
|
|
347
|
-
protected failedRequestHandler?: ErrorHandler<
|
|
424
|
+
get log(): CrawleeLogger;
|
|
425
|
+
protected requestHandler: RequestHandler<ExtendedContext>;
|
|
426
|
+
protected errorHandler?: ErrorHandler<CrawlingContext, ExtendedContext>;
|
|
427
|
+
protected failedRequestHandler?: ErrorHandler<CrawlingContext, ExtendedContext>;
|
|
348
428
|
protected requestHandlerTimeoutMillis: number;
|
|
349
429
|
protected internalTimeoutMillis: number;
|
|
350
430
|
protected maxRequestRetries: number;
|
|
431
|
+
protected maxCrawlDepth?: number;
|
|
351
432
|
protected sameDomainDelayMillis: number;
|
|
352
433
|
protected domainAccessedTime: Map<string, number>;
|
|
353
434
|
protected maxSessionRotations: number;
|
|
435
|
+
protected maxRequestsPerCrawl?: number;
|
|
354
436
|
protected handledRequestsCount: number;
|
|
355
437
|
protected statusMessageLoggingInterval: number;
|
|
356
438
|
protected statusMessageCallback?: StatusMessageCallback;
|
|
357
439
|
protected sessionPoolOptions: SessionPoolOptions;
|
|
358
440
|
protected useSessionPool: boolean;
|
|
359
|
-
protected crawlingContexts: Map<string, Context>;
|
|
360
441
|
protected autoscaledPoolOptions: AutoscaledPoolOptions;
|
|
361
|
-
protected events: EventManager;
|
|
362
442
|
protected httpClient: BaseHttpClient;
|
|
363
443
|
protected retryOnBlocked: boolean;
|
|
364
|
-
protected respectRobotsTxtFile: boolean
|
|
444
|
+
protected respectRobotsTxtFile: boolean | {
|
|
445
|
+
userAgent?: string;
|
|
446
|
+
};
|
|
365
447
|
protected onSkippedRequest?: SkippedRequestCallback;
|
|
366
448
|
private _closeEvents?;
|
|
449
|
+
private shouldLogMaxProcessedRequestsExceeded;
|
|
450
|
+
private shouldLogMaxEnqueuedRequestsExceeded;
|
|
367
451
|
private experiments;
|
|
368
452
|
private readonly robotsTxtFileCache;
|
|
369
453
|
private _experimentWarnings;
|
|
454
|
+
private readonly crawlerId;
|
|
455
|
+
private readonly hasExplicitId;
|
|
370
456
|
protected static optionsShape: {
|
|
457
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
458
|
+
contextPipelineBuilder: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
459
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
460
|
+
extendContext: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
371
461
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
372
462
|
requestList: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
373
463
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
@@ -388,12 +478,16 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
388
478
|
maxSessionRotations: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
389
479
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
390
480
|
maxRequestsPerCrawl: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
481
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
482
|
+
maxCrawlDepth: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
391
483
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
392
484
|
autoscaledPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
393
485
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
394
486
|
sessionPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
395
487
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
396
488
|
useSessionPool: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
489
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
490
|
+
proxyConfiguration: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
397
491
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
398
492
|
statusMessageLoggingInterval: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
399
493
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
@@ -401,11 +495,19 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
401
495
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
402
496
|
retryOnBlocked: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
403
497
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
404
|
-
respectRobotsTxtFile: import("ow").
|
|
498
|
+
respectRobotsTxtFile: import("ow").AnyPredicate<boolean | object>;
|
|
405
499
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
406
500
|
onSkippedRequest: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
407
501
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
408
502
|
httpClient: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
503
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
504
|
+
configuration: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
505
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
506
|
+
storageClient: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
507
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
508
|
+
eventManager: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
509
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
510
|
+
logger: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
409
511
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
410
512
|
minConcurrency: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
411
513
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
@@ -414,17 +516,17 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
414
516
|
maxRequestsPerMinute: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
415
517
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
416
518
|
keepAlive: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
417
|
-
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
418
|
-
log: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
419
519
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
420
520
|
experiments: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
421
521
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
422
522
|
statisticsOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
523
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
524
|
+
id: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
423
525
|
};
|
|
424
526
|
/**
|
|
425
527
|
* All `BasicCrawler` parameters are passed via an options object.
|
|
426
528
|
*/
|
|
427
|
-
constructor(options?: BasicCrawlerOptions<Context
|
|
529
|
+
constructor(options?: BasicCrawlerOptions<Context, ContextExtension, ExtendedContext> & RequireContextPipeline<CrawlingContext, Context>);
|
|
428
530
|
/**
|
|
429
531
|
* Checks if the given error is a proxy error by comparing its message to a list of known proxy error messages.
|
|
430
532
|
* Used for retrying requests that failed due to proxy errors.
|
|
@@ -432,12 +534,6 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
432
534
|
* @param error The error to check.
|
|
433
535
|
*/
|
|
434
536
|
protected isProxyError(error: Error): boolean;
|
|
435
|
-
/**
|
|
436
|
-
* Checks whether the given crawling context is getting blocked by anti-bot protection using several heuristics.
|
|
437
|
-
* Returns `false` if the request is not blocked, otherwise returns a string with a description of the block reason.
|
|
438
|
-
* @param _crawlingContext The crawling context to check.
|
|
439
|
-
*/
|
|
440
|
-
protected isRequestBlocked(_crawlingContext: Context): Promise<string | false>;
|
|
441
537
|
/**
|
|
442
538
|
* This method is periodically called by the crawler, every `statusMessageLoggingInterval` seconds.
|
|
443
539
|
*/
|
|
@@ -453,15 +549,20 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
453
549
|
* @param [requests] The requests to add.
|
|
454
550
|
* @param [options] Options for the request queue.
|
|
455
551
|
*/
|
|
456
|
-
run(requests?:
|
|
552
|
+
run(requests?: RequestsLike, options?: CrawlerRunOptions): Promise<FinalStatistics>;
|
|
457
553
|
/**
|
|
458
554
|
* Gracefully stops the current run of the crawler.
|
|
459
555
|
*
|
|
460
556
|
* All the tasks active at the time of calling this method will be allowed to finish.
|
|
557
|
+
*
|
|
558
|
+
* To stop the crawler immediately, use {@link BasicCrawler.teardown|`crawler.teardown()`} instead.
|
|
461
559
|
*/
|
|
462
560
|
stop(message?: string): void;
|
|
463
561
|
getRequestQueue(): Promise<RequestProvider>;
|
|
464
562
|
useState<State extends Dictionary = Dictionary>(defaultValue?: State): Promise<State>;
|
|
563
|
+
protected get pendingRequestCountApproximation(): number;
|
|
564
|
+
protected calculateEnqueuedRequestLimit(explicitLimit?: number): number | undefined;
|
|
565
|
+
protected handleSkippedRequest(options: Parameters<SkippedRequestCallback>[0]): Promise<void>;
|
|
465
566
|
/**
|
|
466
567
|
* Adds requests to the queue in batches. By default, it will resolve after the initial batch is added, and continue
|
|
467
568
|
* adding the rest in background. You can configure the batch size via `batchSize` option and the sleep time in between
|
|
@@ -473,7 +574,7 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
473
574
|
* @param requests The requests to add
|
|
474
575
|
* @param options Options for the request queue
|
|
475
576
|
*/
|
|
476
|
-
addRequests(requests:
|
|
577
|
+
addRequests(requests: ReadonlyDeep<RequestsLike>, options?: CrawlerAddRequestsOptions): Promise<CrawlerAddRequestsResult>;
|
|
477
578
|
/**
|
|
478
579
|
* Pushes data to the specified {@link Dataset}, or the default crawler {@link Dataset} by calling {@link Dataset.pushData}.
|
|
479
580
|
*/
|
|
@@ -491,8 +592,11 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
491
592
|
* Supported formats are currently 'json' and 'csv', and will be inferred from the `path` automatically.
|
|
492
593
|
*/
|
|
493
594
|
exportData<Data>(path: string, format?: 'json' | 'csv', options?: DatasetExportOptions): Promise<Data[]>;
|
|
595
|
+
/**
|
|
596
|
+
* Initializes the crawler.
|
|
597
|
+
*/
|
|
494
598
|
protected _init(): Promise<void>;
|
|
495
|
-
protected
|
|
599
|
+
protected runRequestHandler(crawlingContext: CrawlingContext): Promise<void>;
|
|
496
600
|
/**
|
|
497
601
|
* Handles blocked request
|
|
498
602
|
*/
|
|
@@ -501,31 +605,42 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
501
605
|
protected getRobotsTxtFileForUrl(url: string): Promise<RobotsTxtFile | undefined>;
|
|
502
606
|
protected _pauseOnMigration(): Promise<void>;
|
|
503
607
|
/**
|
|
504
|
-
*
|
|
505
|
-
* and RequestQueue is present then enqueues it to the queue first.
|
|
608
|
+
* Initializes the RequestManager based on the configured requestList and requestQueue.
|
|
506
609
|
*/
|
|
507
|
-
|
|
610
|
+
private initializeRequestManager;
|
|
508
611
|
/**
|
|
509
|
-
*
|
|
510
|
-
* Can be used to clean up orphaned browser pages.
|
|
612
|
+
* Fetches the next request to process from the underlying request provider.
|
|
511
613
|
*/
|
|
512
|
-
protected
|
|
614
|
+
protected _fetchNextRequest(): Promise<Request<Dictionary> | null>;
|
|
513
615
|
/**
|
|
514
616
|
* Delays processing of the request based on the `sameDomainDelaySecs` option,
|
|
515
617
|
* adding it back to the queue after the timeout passes. Returns `true` if the request
|
|
516
618
|
* should be ignored and will be reclaimed to the queue once ready.
|
|
517
619
|
*/
|
|
518
|
-
protected delayRequest(request: Request, source: IRequestList | RequestProvider): boolean;
|
|
620
|
+
protected delayRequest(request: Request, source: IRequestList | RequestProvider | IRequestManager): boolean;
|
|
519
621
|
/**
|
|
520
622
|
* Wrapper around requestHandler that fetches requests from RequestList/RequestQueue
|
|
521
623
|
* then retries them in a case of an error, etc.
|
|
522
624
|
*/
|
|
523
625
|
protected _runTaskFunction(): Promise<void>;
|
|
524
626
|
/**
|
|
525
|
-
*
|
|
627
|
+
* Wrapper around the crawling context's `enqueueLinks` method:
|
|
628
|
+
* - Injects `crawlDepth` to each request being added based on the crawling context request.
|
|
629
|
+
* - Provides defaults for the `enqueueLinks` options based on the crawler configuration.
|
|
630
|
+
* - These options can be overridden by the user.
|
|
631
|
+
* @internal
|
|
632
|
+
*/
|
|
633
|
+
protected enqueueLinksWithCrawlDepth(options: SetRequired<EnqueueLinksOptions, 'urls'>, request: Request<Dictionary>, requestQueue: RequestProvider): Promise<BatchAddRequestsResult>;
|
|
634
|
+
/**
|
|
635
|
+
* Generator function that yields requests injected with the given crawl depth.
|
|
636
|
+
* @internal
|
|
637
|
+
*/
|
|
638
|
+
protected addCrawlDepthRequestGenerator(requests: RequestsLike, newRequestDepth: number): AsyncGenerator<Source, void, undefined>;
|
|
639
|
+
/**
|
|
640
|
+
* Run async callback with given timeout and retry. Returns the result of the callback.
|
|
526
641
|
* @ignore
|
|
527
642
|
*/
|
|
528
|
-
protected _timeoutAndRetry(handler: () => Promise<
|
|
643
|
+
protected _timeoutAndRetry<T>(handler: () => Promise<T>, timeout: number, error: Error | string, maxRetries?: number, retried?: number): Promise<T>;
|
|
529
644
|
/**
|
|
530
645
|
* Returns true if either RequestList or RequestQueue have a request ready for processing.
|
|
531
646
|
*/
|
|
@@ -535,12 +650,17 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
535
650
|
*/
|
|
536
651
|
protected _defaultIsFinishedFunction(): Promise<boolean>;
|
|
537
652
|
private _rotateSession;
|
|
653
|
+
/**
|
|
654
|
+
* Unwraps errors thrown by the context pipeline to get the actual user error.
|
|
655
|
+
* RequestHandlerError and ContextPipelineInitializationError wrap the actual error.
|
|
656
|
+
*/
|
|
657
|
+
private unwrapError;
|
|
538
658
|
/**
|
|
539
659
|
* Handles errors thrown by user provided requestHandler()
|
|
540
660
|
*/
|
|
541
|
-
protected _requestFunctionErrorHandler(error: Error, crawlingContext:
|
|
661
|
+
protected _requestFunctionErrorHandler(error: Error, crawlingContext: CrawlingContext, source: IRequestList | IRequestManager): Promise<void>;
|
|
542
662
|
protected _tagUserHandlerError<T>(cb: () => unknown): Promise<T>;
|
|
543
|
-
protected _handleFailedRequestHandler(crawlingContext:
|
|
663
|
+
protected _handleFailedRequestHandler(crawlingContext: CrawlingContext, error: Error): Promise<void>;
|
|
544
664
|
/**
|
|
545
665
|
* Resolves the most verbose error message from a thrown error
|
|
546
666
|
* @param error The error received
|
|
@@ -549,23 +669,21 @@ export declare class BasicCrawler<Context extends CrawlingContext = BasicCrawlin
|
|
|
549
669
|
protected _getMessageFromError(error: Error, forceStack?: boolean): string | TimeoutError | undefined;
|
|
550
670
|
protected _canRequestBeRetried(request: Request, error: Error): boolean;
|
|
551
671
|
/**
|
|
552
|
-
* Updates handledRequestsCount from possibly stored counts,
|
|
553
|
-
* usually after worker migration. Since one of the stores
|
|
554
|
-
* needs to have priority when both are present,
|
|
555
|
-
* it is the request queue, because generally, the request
|
|
556
|
-
* list will first be dumped into the queue and then left
|
|
557
|
-
* empty.
|
|
672
|
+
* Updates handledRequestsCount from possibly stored counts, usually after worker migration.
|
|
558
673
|
*/
|
|
559
674
|
protected _loadHandledRequestCount(): Promise<void>;
|
|
560
675
|
protected _executeHooks<HookLike extends (...args: any[]) => Awaitable<void>>(hooks: HookLike[], ...args: Parameters<HookLike>): Promise<void>;
|
|
561
676
|
/**
|
|
562
|
-
*
|
|
563
|
-
*
|
|
677
|
+
* Stops the crawler immediately.
|
|
678
|
+
*
|
|
679
|
+
* This method doesn't wait for currently active requests to finish.
|
|
680
|
+
*
|
|
681
|
+
* To stop the crawler gracefully (waiting for all running requests to finish), use {@link BasicCrawler.stop|`crawler.stop()`} instead.
|
|
564
682
|
*/
|
|
565
683
|
teardown(): Promise<void>;
|
|
566
684
|
protected _getCookieHeaderFromRequest(request: Request): string;
|
|
567
685
|
private _getRequestQueue;
|
|
568
|
-
|
|
686
|
+
private requestMatchesEnqueueStrategy;
|
|
569
687
|
}
|
|
570
688
|
export interface CreateContextOptions {
|
|
571
689
|
request: Request;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-crawler.d.ts","sourceRoot":"","sources":["../../src/internals/basic-crawler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"basic-crawler.d.ts","sourceRoot":"","sources":["../../src/internals/basic-crawler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,OAAO,EACP,YAAY,EAEZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,sBAAsB,EACtB,MAAM,EACN,iBAAiB,EACjB,cAAc,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,cAAc,EAEd,eAAe,EAKf,OAAO,EAYP,eAAe,EASf,WAAW,EACX,UAAU,EAEb,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EACR,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,UAAU,EACV,SAAS,EACT,uBAAuB,EACvB,aAAa,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAA8C,aAAa,EAAuB,MAAM,gBAAgB,CAAC;AAKhH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,EAAuB,YAAY,EAAa,MAAM,gBAAgB,CAAC;AAK9E,MAAM,WAAW,oBAAoB,CAAC,QAAQ,SAAS,UAAU,GAAG,UAAU,CAAE,SAAQ,eAAe,CAAC,QAAQ,CAAC;CAAG;AAapH,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,eAAe,GAAG,eAAe,IAAI,CAAC,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC,IAAI,CAAC,CAAC;AAErH,MAAM,MAAM,YAAY,CACpB,OAAO,SAAS,eAAe,GAAG,eAAe,EACjD,eAAe,SAAS,OAAO,GAAG,OAAO,IACzC,CAAC,MAAM,EAA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