@crawlee/core 3.13.3-beta.8 → 3.13.3
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/autoscaling/autoscaled_pool.d.ts +16 -16
- package/autoscaling/autoscaled_pool.js +13 -13
- package/autoscaling/snapshotter.d.ts +1 -1
- package/autoscaling/snapshotter.js +1 -1
- package/autoscaling/system_status.d.ts +12 -12
- package/autoscaling/system_status.js +11 -11
- package/configuration.d.ts +10 -10
- package/configuration.js +4 -4
- package/crawlers/crawler_commons.d.ts +12 -12
- package/crawlers/crawler_commons.d.ts.map +1 -1
- package/crawlers/crawler_commons.js +5 -12
- package/crawlers/crawler_commons.js.map +1 -1
- package/crawlers/statistics.d.ts +5 -17
- package/crawlers/statistics.d.ts.map +1 -1
- package/crawlers/statistics.js +9 -20
- package/crawlers/statistics.js.map +1 -1
- package/enqueue_links/enqueue_links.d.ts +14 -14
- package/enqueue_links/enqueue_links.js +5 -5
- package/enqueue_links/shared.d.ts +2 -2
- package/http_clients/base-http-client.d.ts +7 -7
- package/http_clients/base-http-client.js +1 -1
- package/package.json +5 -5
- package/proxy_configuration.d.ts +11 -11
- package/proxy_configuration.js +8 -8
- package/request.d.ts +3 -3
- package/request.js +2 -2
- package/session_pool/session.d.ts +1 -1
- package/session_pool/session_pool.d.ts +12 -12
- package/session_pool/session_pool.js +10 -10
- package/storages/dataset.d.ts +15 -15
- package/storages/dataset.js +9 -9
- package/storages/key_value_store.d.ts +32 -32
- package/storages/key_value_store.js +22 -22
- package/storages/request_list.d.ts +35 -35
- package/storages/request_list.js +19 -19
- package/storages/request_provider.d.ts +19 -19
- package/storages/request_provider.js +12 -12
- package/storages/request_queue.d.ts +16 -16
- package/storages/request_queue.js +16 -16
- package/storages/request_queue_v2.d.ts +7 -7
- package/storages/request_queue_v2.js +7 -7
- package/storages/utils.d.ts +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
package/crawlers/statistics.d.ts
CHANGED
|
@@ -2,17 +2,6 @@ import type { Log } from '@apify/log';
|
|
|
2
2
|
import { Configuration } from '../configuration';
|
|
3
3
|
import { KeyValueStore } from '../storages/key_value_store';
|
|
4
4
|
import { ErrorTracker } from './error_tracker';
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
declare class Job {
|
|
9
|
-
private lastRunAt;
|
|
10
|
-
private runs;
|
|
11
|
-
private durationMillis?;
|
|
12
|
-
run(): number;
|
|
13
|
-
finish(): number;
|
|
14
|
-
retryCount(): number;
|
|
15
|
-
}
|
|
16
5
|
/**
|
|
17
6
|
* Persistence-related options to control how and when crawler's data gets persisted.
|
|
18
7
|
*/
|
|
@@ -48,7 +37,7 @@ export declare class Statistics {
|
|
|
48
37
|
*/
|
|
49
38
|
readonly id: number;
|
|
50
39
|
/**
|
|
51
|
-
* Current statistic state used for doing calculations on {@
|
|
40
|
+
* Current statistic state used for doing calculations on {@link Statistics.calculate} calls
|
|
52
41
|
*/
|
|
53
42
|
state: StatisticState;
|
|
54
43
|
/**
|
|
@@ -95,12 +84,12 @@ export declare class Statistics {
|
|
|
95
84
|
* Mark job as finished and sets the state
|
|
96
85
|
* @ignore
|
|
97
86
|
*/
|
|
98
|
-
finishJob(id: number | string): void;
|
|
87
|
+
finishJob(id: number | string, retryCount: number): void;
|
|
99
88
|
/**
|
|
100
89
|
* Mark job as failed and sets the state
|
|
101
90
|
* @ignore
|
|
102
91
|
*/
|
|
103
|
-
failJob(id: number | string): void;
|
|
92
|
+
failJob(id: number | string, retryCount: number): void;
|
|
104
93
|
/**
|
|
105
94
|
* Calculate the current statistics
|
|
106
95
|
*/
|
|
@@ -122,7 +111,7 @@ export declare class Statistics {
|
|
|
122
111
|
* Stops logging and remove event listeners, then persist
|
|
123
112
|
*/
|
|
124
113
|
stopCapturing(): Promise<void>;
|
|
125
|
-
protected _saveRetryCountForJob(
|
|
114
|
+
protected _saveRetryCountForJob(retryCount: number): void;
|
|
126
115
|
/**
|
|
127
116
|
* Persist internal state to the key value store
|
|
128
117
|
* @param options - Override the persistence options provided in the constructor
|
|
@@ -140,7 +129,7 @@ export declare class Statistics {
|
|
|
140
129
|
toJSON(): StatisticPersistedState;
|
|
141
130
|
}
|
|
142
131
|
/**
|
|
143
|
-
* Configuration for the {@
|
|
132
|
+
* Configuration for the {@link Statistics} instance used by the crawler
|
|
144
133
|
*/
|
|
145
134
|
export interface StatisticsOptions {
|
|
146
135
|
/**
|
|
@@ -212,5 +201,4 @@ export interface StatisticState {
|
|
|
212
201
|
retryErrors: Record<string, unknown>;
|
|
213
202
|
requestsWithStatusCode: Record<string, number>;
|
|
214
203
|
}
|
|
215
|
-
export {};
|
|
216
204
|
//# sourceMappingURL=statistics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../src/crawlers/statistics.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../src/crawlers/statistics.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA4B/C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,qBAAa,UAAU;IACnB,OAAO,CAAC,MAAM,CAA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CAAC;IACzC,kCAAkC,EAAE,MAAM,CAAC;IAC3C,gBAAgB,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IACvC,iBAAiB,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClD"}
|
package/crawlers/statistics.js
CHANGED
|
@@ -18,12 +18,6 @@ class Job {
|
|
|
18
18
|
writable: true,
|
|
19
19
|
value: null
|
|
20
20
|
});
|
|
21
|
-
Object.defineProperty(this, "runs", {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
configurable: true,
|
|
24
|
-
writable: true,
|
|
25
|
-
value: 0
|
|
26
|
-
});
|
|
27
21
|
Object.defineProperty(this, "durationMillis", {
|
|
28
22
|
enumerable: true,
|
|
29
23
|
configurable: true,
|
|
@@ -33,15 +27,11 @@ class Job {
|
|
|
33
27
|
}
|
|
34
28
|
run() {
|
|
35
29
|
this.lastRunAt = Date.now();
|
|
36
|
-
return ++this.runs;
|
|
37
30
|
}
|
|
38
31
|
finish() {
|
|
39
32
|
this.durationMillis = Date.now() - this.lastRunAt;
|
|
40
33
|
return this.durationMillis;
|
|
41
34
|
}
|
|
42
|
-
retryCount() {
|
|
43
|
-
return Math.max(0, this.runs - 1);
|
|
44
|
-
}
|
|
45
35
|
}
|
|
46
36
|
const errorTrackerConfig = {
|
|
47
37
|
showErrorCode: true,
|
|
@@ -94,7 +84,7 @@ class Statistics {
|
|
|
94
84
|
value: Statistics.id++
|
|
95
85
|
}); // assign an id while incrementing so it can be saved/restored from KV
|
|
96
86
|
/**
|
|
97
|
-
* Current statistic state used for doing calculations on {@
|
|
87
|
+
* Current statistic state used for doing calculations on {@link Statistics.calculate} calls
|
|
98
88
|
*/
|
|
99
89
|
Object.defineProperty(this, "state", {
|
|
100
90
|
enumerable: true,
|
|
@@ -277,14 +267,14 @@ class Statistics {
|
|
|
277
267
|
* Mark job as finished and sets the state
|
|
278
268
|
* @ignore
|
|
279
269
|
*/
|
|
280
|
-
finishJob(id) {
|
|
270
|
+
finishJob(id, retryCount) {
|
|
281
271
|
const job = this.requestsInProgress.get(id);
|
|
282
272
|
if (!job)
|
|
283
273
|
return;
|
|
284
274
|
const jobDurationMillis = job.finish();
|
|
285
275
|
this.state.requestsFinished++;
|
|
286
276
|
this.state.requestTotalFinishedDurationMillis += jobDurationMillis;
|
|
287
|
-
this._saveRetryCountForJob(
|
|
277
|
+
this._saveRetryCountForJob(retryCount);
|
|
288
278
|
if (jobDurationMillis < this.state.requestMinDurationMillis)
|
|
289
279
|
this.state.requestMinDurationMillis = jobDurationMillis;
|
|
290
280
|
if (jobDurationMillis > this.state.requestMaxDurationMillis)
|
|
@@ -295,13 +285,13 @@ class Statistics {
|
|
|
295
285
|
* Mark job as failed and sets the state
|
|
296
286
|
* @ignore
|
|
297
287
|
*/
|
|
298
|
-
failJob(id) {
|
|
288
|
+
failJob(id, retryCount) {
|
|
299
289
|
const job = this.requestsInProgress.get(id);
|
|
300
290
|
if (!job)
|
|
301
291
|
return;
|
|
302
292
|
this.state.requestTotalFailedDurationMillis += job.finish();
|
|
303
293
|
this.state.requestsFailed++;
|
|
304
|
-
this._saveRetryCountForJob(
|
|
294
|
+
this._saveRetryCountForJob(retryCount);
|
|
305
295
|
this.requestsInProgress.delete(id);
|
|
306
296
|
}
|
|
307
297
|
/**
|
|
@@ -349,13 +339,12 @@ class Statistics {
|
|
|
349
339
|
this.state.crawlerFinishedAt = new Date();
|
|
350
340
|
await this.persistState();
|
|
351
341
|
}
|
|
352
|
-
_saveRetryCountForJob(
|
|
353
|
-
|
|
342
|
+
_saveRetryCountForJob(retryCount) {
|
|
343
|
+
var _a;
|
|
354
344
|
if (retryCount > 0)
|
|
355
345
|
this.state.requestsRetries++;
|
|
356
|
-
this.requestRetryHistogram[retryCount]
|
|
357
|
-
|
|
358
|
-
: 1;
|
|
346
|
+
(_a = this.requestRetryHistogram)[retryCount] ?? (_a[retryCount] = 0);
|
|
347
|
+
this.requestRetryHistogram[retryCount]++;
|
|
359
348
|
}
|
|
360
349
|
/**
|
|
361
350
|
* Persist internal state to the key value store
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statistics.js","sourceRoot":"","sources":["../../src/crawlers/statistics.ts"],"names":[],"mappings":";;;;AAAA,oDAAoB;AAIpB,oDAAiD;AAGjD,gCAA2C;AAC3C,iEAA4D;AAC5D,mDAA+C;AAE/C;;GAEG;AACH,MAAM,GAAG;IAAT;QACY;;;;mBAA2B,IAAI;WAAC;QAChC;;;;mBAAO,CAAC;WAAC;QACT;;;;;WAAwB;IAepC,CAAC;IAbG,GAAG;QACC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC5B,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,MAAM;QACF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAU,CAAC;QACnD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IACtC,CAAC;CACJ;AAED,MAAM,kBAAkB,GAAG;IACvB,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,KAAK;IACpB,gBAAgB,EAAE,IAAI;IACtB,eAAe,EAAE,KAAK;CACzB,CAAC;AAaF;;;;;;;;;GASG;AACH,MAAa,UAAU;IA6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CAAC,SAAS,EAAE;SACtB,CAAC;QAEF,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;QACzD,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACzC,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAE9C,MAAM,CAAC,sBAAsB,GAAG,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC;QAClE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAClC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;QAE5C,OAAO,MAAM,CAAC;IAClB,CAAC;;AAzWL,gCA0WC;AAzWkB;;;;WAAK,CAAC;EAAJ,CAAK"}
|
|
@@ -16,9 +16,9 @@ export interface EnqueueLinksOptions extends RequestQueueOperationOptions {
|
|
|
16
16
|
requestQueue?: RequestProvider;
|
|
17
17
|
/** A CSS selector matching links to be enqueued. */
|
|
18
18
|
selector?: string;
|
|
19
|
-
/** Sets {@
|
|
19
|
+
/** Sets {@link Request.userData} for newly enqueued requests. */
|
|
20
20
|
userData?: Dictionary;
|
|
21
|
-
/** Sets {@
|
|
21
|
+
/** Sets {@link Request.label} for newly enqueued requests. */
|
|
22
22
|
label?: string;
|
|
23
23
|
/**
|
|
24
24
|
* If set to `true`, tells the crawler to skip navigation and process the request directly.
|
|
@@ -35,7 +35,7 @@ export interface EnqueueLinksOptions extends RequestQueueOperationOptions {
|
|
|
35
35
|
* containing glob pattern strings matching the URLs to be enqueued.
|
|
36
36
|
*
|
|
37
37
|
* The plain objects must include at least the `glob` property, which holds the glob pattern string.
|
|
38
|
-
* All remaining keys will be used as request options for the corresponding enqueued {@
|
|
38
|
+
* All remaining keys will be used as request options for the corresponding enqueued {@link Request} objects.
|
|
39
39
|
*
|
|
40
40
|
* The matching is always case-insensitive.
|
|
41
41
|
* If you need case-sensitive matching, use `regexps` property directly.
|
|
@@ -49,7 +49,7 @@ export interface EnqueueLinksOptions extends RequestQueueOperationOptions {
|
|
|
49
49
|
* containing patterns matching URLs that will **never** be enqueued.
|
|
50
50
|
*
|
|
51
51
|
* The plain objects must include either the `glob` property or the `regexp` property.
|
|
52
|
-
* All remaining keys will be used as request options for the corresponding enqueued {@
|
|
52
|
+
* All remaining keys will be used as request options for the corresponding enqueued {@link Request} objects.
|
|
53
53
|
*
|
|
54
54
|
* Glob matching is always case-insensitive.
|
|
55
55
|
* If you need case-sensitive matching, provide a regexp.
|
|
@@ -60,7 +60,7 @@ export interface EnqueueLinksOptions extends RequestQueueOperationOptions {
|
|
|
60
60
|
* containing regular expressions matching the URLs to be enqueued.
|
|
61
61
|
*
|
|
62
62
|
* The plain objects must include at least the `regexp` property, which holds the regular expression.
|
|
63
|
-
* All remaining keys will be used as request options for the corresponding enqueued {@
|
|
63
|
+
* All remaining keys will be used as request options for the corresponding enqueued {@link Request} objects.
|
|
64
64
|
*
|
|
65
65
|
* If `regexps` is an empty array or `undefined`, and `globs` are also not defined, then the function
|
|
66
66
|
* enqueues the links with the same subdomain.
|
|
@@ -70,11 +70,11 @@ export interface EnqueueLinksOptions extends RequestQueueOperationOptions {
|
|
|
70
70
|
* *NOTE:* In future versions of SDK the options will be removed.
|
|
71
71
|
* Please use `globs` or `regexps` instead.
|
|
72
72
|
*
|
|
73
|
-
* An array of {@
|
|
74
|
-
* containing {@
|
|
73
|
+
* An array of {@link PseudoUrl} strings or plain objects
|
|
74
|
+
* containing {@link PseudoUrl} strings matching the URLs to be enqueued.
|
|
75
75
|
*
|
|
76
76
|
* The plain objects must include at least the `purl` property, which holds the pseudo-URL string.
|
|
77
|
-
* All remaining keys will be used as request options for the corresponding enqueued {@
|
|
77
|
+
* All remaining keys will be used as request options for the corresponding enqueued {@link Request} objects.
|
|
78
78
|
*
|
|
79
79
|
* With a pseudo-URL string, the matching is always case-insensitive.
|
|
80
80
|
* If you need case-sensitive matching, use `regexps` property directly.
|
|
@@ -86,7 +86,7 @@ export interface EnqueueLinksOptions extends RequestQueueOperationOptions {
|
|
|
86
86
|
*/
|
|
87
87
|
pseudoUrls?: readonly PseudoUrlInput[];
|
|
88
88
|
/**
|
|
89
|
-
* Just before a new {@
|
|
89
|
+
* Just before a new {@link Request} is constructed and enqueued to the {@link RequestQueue}, this function can be used
|
|
90
90
|
* to remove it or modify its contents such as `userData`, `payload` or, most importantly `uniqueKey`. This is useful
|
|
91
91
|
* when you need to enqueue multiple `Requests` to the queue that share the same URL, but differ in methods or payloads,
|
|
92
92
|
* or to dynamically update or create `userData`.
|
|
@@ -197,11 +197,11 @@ export declare enum EnqueueStrategy {
|
|
|
197
197
|
SameOrigin = "same-origin"
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
-
* This function enqueues the urls provided to the {@
|
|
200
|
+
* This function enqueues the urls provided to the {@link RequestQueue} provided. If you want to automatically find and enqueue links,
|
|
201
201
|
* you should use the context-aware `enqueueLinks` function provided on the crawler contexts.
|
|
202
202
|
*
|
|
203
203
|
* Optionally, the function allows you to filter the target links' URLs using an array of globs or regular expressions
|
|
204
|
-
* and override settings of the enqueued {@
|
|
204
|
+
* and override settings of the enqueued {@link Request} objects.
|
|
205
205
|
*
|
|
206
206
|
* **Example usage**
|
|
207
207
|
*
|
|
@@ -218,14 +218,14 @@ export declare enum EnqueueStrategy {
|
|
|
218
218
|
* ```
|
|
219
219
|
*
|
|
220
220
|
* @param options All `enqueueLinks()` parameters are passed via an options object.
|
|
221
|
-
* @returns Promise that resolves to {@
|
|
221
|
+
* @returns Promise that resolves to {@link BatchAddRequestsResult} object.
|
|
222
222
|
*/
|
|
223
223
|
export declare function enqueueLinks(options: SetRequired<EnqueueLinksOptions, 'requestQueue' | 'urls'>): Promise<BatchAddRequestsResult>;
|
|
224
224
|
/**
|
|
225
225
|
* @internal
|
|
226
|
-
* This method helps resolve the baseUrl that will be used for filtering in {@
|
|
226
|
+
* This method helps resolve the baseUrl that will be used for filtering in {@link enqueueLinks}.
|
|
227
227
|
* - If a user provides a base url, we always return it
|
|
228
|
-
* - If a user specifies {@
|
|
228
|
+
* - If a user specifies {@link EnqueueStrategy.All} strategy, they do not care if the newly found urls are on the original
|
|
229
229
|
* request domain, or a redirected one
|
|
230
230
|
* - In all other cases, we return the domain of the original request as that's the one we need to use for filtering
|
|
231
231
|
*/
|
|
@@ -61,11 +61,11 @@ var EnqueueStrategy;
|
|
|
61
61
|
EnqueueStrategy["SameOrigin"] = "same-origin";
|
|
62
62
|
})(EnqueueStrategy || (exports.EnqueueStrategy = EnqueueStrategy = {}));
|
|
63
63
|
/**
|
|
64
|
-
* This function enqueues the urls provided to the {@
|
|
64
|
+
* This function enqueues the urls provided to the {@link RequestQueue} provided. If you want to automatically find and enqueue links,
|
|
65
65
|
* you should use the context-aware `enqueueLinks` function provided on the crawler contexts.
|
|
66
66
|
*
|
|
67
67
|
* Optionally, the function allows you to filter the target links' URLs using an array of globs or regular expressions
|
|
68
|
-
* and override settings of the enqueued {@
|
|
68
|
+
* and override settings of the enqueued {@link Request} objects.
|
|
69
69
|
*
|
|
70
70
|
* **Example usage**
|
|
71
71
|
*
|
|
@@ -82,7 +82,7 @@ var EnqueueStrategy;
|
|
|
82
82
|
* ```
|
|
83
83
|
*
|
|
84
84
|
* @param options All `enqueueLinks()` parameters are passed via an options object.
|
|
85
|
-
* @returns Promise that resolves to {@
|
|
85
|
+
* @returns Promise that resolves to {@link BatchAddRequestsResult} object.
|
|
86
86
|
*/
|
|
87
87
|
async function enqueueLinks(options) {
|
|
88
88
|
if (!options || Object.keys(options).length === 0) {
|
|
@@ -215,9 +215,9 @@ async function enqueueLinks(options) {
|
|
|
215
215
|
}
|
|
216
216
|
/**
|
|
217
217
|
* @internal
|
|
218
|
-
* This method helps resolve the baseUrl that will be used for filtering in {@
|
|
218
|
+
* This method helps resolve the baseUrl that will be used for filtering in {@link enqueueLinks}.
|
|
219
219
|
* - If a user provides a base url, we always return it
|
|
220
|
-
* - If a user specifies {@
|
|
220
|
+
* - If a user specifies {@link EnqueueStrategy.All} strategy, they do not care if the newly found urls are on the original
|
|
221
221
|
* request domain, or a redirected one
|
|
222
222
|
* - In all other cases, we return the domain of the original request as that's the one we need to use for filtering
|
|
223
223
|
*/
|
|
@@ -54,8 +54,8 @@ export declare function filterRequestsByPatterns(requests: Request[], patterns?:
|
|
|
54
54
|
*/
|
|
55
55
|
export declare function createRequestOptions(sources: (string | Record<string, unknown>)[], options?: Pick<EnqueueLinksOptions, 'label' | 'userData' | 'baseUrl' | 'skipNavigation' | 'strategy'>): RequestOptions[];
|
|
56
56
|
/**
|
|
57
|
-
* Takes an Apify {@
|
|
58
|
-
* {@
|
|
57
|
+
* Takes an Apify {@link RequestOptions} object and changes its attributes in a desired way. This user-function is used
|
|
58
|
+
* {@link enqueueLinks} to modify requests before enqueuing them.
|
|
59
59
|
*/
|
|
60
60
|
export interface RequestTransform {
|
|
61
61
|
/**
|
|
@@ -13,7 +13,7 @@ type Timeout = {
|
|
|
13
13
|
};
|
|
14
14
|
type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'TRACE' | 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace';
|
|
15
15
|
/**
|
|
16
|
-
* Maps permitted values of the `responseType` option on {@
|
|
16
|
+
* Maps permitted values of the `responseType` option on {@link HttpRequest} to the types that they produce.
|
|
17
17
|
*/
|
|
18
18
|
export interface ResponseTypes {
|
|
19
19
|
'json': unknown;
|
|
@@ -35,7 +35,7 @@ interface PromiseCookieJar {
|
|
|
35
35
|
}
|
|
36
36
|
type SimpleHeaders = Record<string, string | string[] | undefined>;
|
|
37
37
|
/**
|
|
38
|
-
* HTTP Request as accepted by {@
|
|
38
|
+
* HTTP Request as accepted by {@link BaseHttpClient} methods.
|
|
39
39
|
*/
|
|
40
40
|
export interface HttpRequest<TResponseType extends keyof ResponseTypes = 'text'> {
|
|
41
41
|
[k: string]: unknown;
|
|
@@ -61,7 +61,7 @@ export interface HttpRequest<TResponseType extends keyof ResponseTypes = 'text'>
|
|
|
61
61
|
sessionToken?: object;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Additional options for HTTP requests that need to be handled separately before passing to {@
|
|
64
|
+
* Additional options for HTTP requests that need to be handled separately before passing to {@link BaseHttpClient}.
|
|
65
65
|
*/
|
|
66
66
|
export interface HttpRequestOptions<TResponseType extends keyof ResponseTypes = 'text'> extends HttpRequest<TResponseType> {
|
|
67
67
|
/** Search (query string) parameters to be appended to the request URL */
|
|
@@ -76,7 +76,7 @@ export interface HttpRequestOptions<TResponseType extends keyof ResponseTypes =
|
|
|
76
76
|
password?: string;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* HTTP response data, without a body, as returned by {@
|
|
79
|
+
* HTTP response data, without a body, as returned by {@link BaseHttpClient} methods.
|
|
80
80
|
*/
|
|
81
81
|
export interface BaseHttpResponseData {
|
|
82
82
|
redirectUrls: URL[];
|
|
@@ -92,14 +92,14 @@ interface HttpResponseWithoutBody<TResponseType extends keyof ResponseTypes = ke
|
|
|
92
92
|
request: HttpRequest<TResponseType>;
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
|
-
* HTTP response data as returned by the {@
|
|
95
|
+
* HTTP response data as returned by the {@link BaseHttpClient.sendRequest} method.
|
|
96
96
|
*/
|
|
97
97
|
export interface HttpResponse<TResponseType extends keyof ResponseTypes = keyof ResponseTypes> extends HttpResponseWithoutBody<TResponseType> {
|
|
98
98
|
[k: string]: any;
|
|
99
99
|
body: ResponseTypes[TResponseType];
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
|
-
* HTTP response data as returned by the {@
|
|
102
|
+
* HTTP response data as returned by the {@link BaseHttpClient.stream} method.
|
|
103
103
|
*/
|
|
104
104
|
export interface StreamingHttpResponse extends HttpResponseWithoutBody {
|
|
105
105
|
stream: Readable;
|
|
@@ -127,7 +127,7 @@ export interface BaseHttpClient {
|
|
|
127
127
|
stream(request: HttpRequest, onRedirect?: RedirectHandler): Promise<StreamingHttpResponse>;
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
130
|
-
* Converts {@
|
|
130
|
+
* Converts {@link HttpRequestOptions} to a {@link HttpRequest}.
|
|
131
131
|
*/
|
|
132
132
|
export declare function processHttpRequestOptions<TResponseType extends keyof ResponseTypes = 'text'>({ searchParams, form, json, username, password, ...request }: HttpRequestOptions<TResponseType>): HttpRequest<TResponseType>;
|
|
133
133
|
export {};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.processHttpRequestOptions = processHttpRequestOptions;
|
|
4
4
|
const utils_1 = require("@crawlee/utils");
|
|
5
5
|
/**
|
|
6
|
-
* Converts {@
|
|
6
|
+
* Converts {@link HttpRequestOptions} to a {@link HttpRequest}.
|
|
7
7
|
*/
|
|
8
8
|
function processHttpRequestOptions({ searchParams, form, json, username, password, ...request }) {
|
|
9
9
|
const url = new URL(request.url);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/core",
|
|
3
|
-
"version": "3.13.3
|
|
3
|
+
"version": "3.13.3",
|
|
4
4
|
"description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.0.0"
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"@apify/pseudo_url": "^2.0.30",
|
|
60
60
|
"@apify/timeout": "^0.3.0",
|
|
61
61
|
"@apify/utilities": "^2.7.10",
|
|
62
|
-
"@crawlee/memory-storage": "3.13.3
|
|
63
|
-
"@crawlee/types": "3.13.3
|
|
64
|
-
"@crawlee/utils": "3.13.3
|
|
62
|
+
"@crawlee/memory-storage": "3.13.3",
|
|
63
|
+
"@crawlee/types": "3.13.3",
|
|
64
|
+
"@crawlee/utils": "3.13.3",
|
|
65
65
|
"@sapphire/async-queue": "^1.5.1",
|
|
66
66
|
"@vladfrangu/async_event_emitter": "^2.2.2",
|
|
67
67
|
"csv-stringify": "^6.2.0",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "279cadbd3cd6342f36cc4d841e07b999e472420d"
|
|
87
87
|
}
|
package/proxy_configuration.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface ProxyConfigurationOptions {
|
|
|
15
15
|
* Custom function that allows you to generate the new proxy URL dynamically. It gets the `sessionId` as a parameter and an optional parameter with the `Request` object when applicable.
|
|
16
16
|
* Can return either stringified proxy URL or `null` if the proxy should not be used. Can be asynchronous.
|
|
17
17
|
*
|
|
18
|
-
* This function is used to generate the URL when {@
|
|
18
|
+
* This function is used to generate the URL when {@link ProxyConfiguration.newUrl} or {@link ProxyConfiguration.newProxyInfo} is called.
|
|
19
19
|
*/
|
|
20
20
|
newUrlFunction?: ProxyConfigurationFunction;
|
|
21
21
|
/**
|
|
@@ -38,7 +38,7 @@ export interface TieredProxy {
|
|
|
38
38
|
/**
|
|
39
39
|
* The main purpose of the ProxyInfo object is to provide information
|
|
40
40
|
* about the current proxy connection used by the crawler for the request.
|
|
41
|
-
* Outside of crawlers, you can get this object by calling {@
|
|
41
|
+
* Outside of crawlers, you can get this object by calling {@link ProxyConfiguration.newProxyInfo}.
|
|
42
42
|
*
|
|
43
43
|
* **Example usage:**
|
|
44
44
|
*
|
|
@@ -67,7 +67,7 @@ export interface TieredProxy {
|
|
|
67
67
|
*/
|
|
68
68
|
export interface ProxyInfo {
|
|
69
69
|
/**
|
|
70
|
-
* The identifier of used {@
|
|
70
|
+
* The identifier of used {@link Session}, if used.
|
|
71
71
|
*/
|
|
72
72
|
sessionId?: string;
|
|
73
73
|
/**
|
|
@@ -129,9 +129,9 @@ declare class ProxyTierTracker {
|
|
|
129
129
|
* Configures connection to a proxy server with the provided options. Proxy servers are used to prevent target websites from blocking
|
|
130
130
|
* your crawlers based on IP address rate limits or blacklists. Setting proxy configuration in your crawlers automatically configures
|
|
131
131
|
* them to use the selected proxies for all connections. You can get information about the currently used proxy by inspecting
|
|
132
|
-
* the {@
|
|
132
|
+
* the {@link ProxyInfo} property in your crawler's page function. There, you can inspect the proxy's URL and other attributes.
|
|
133
133
|
*
|
|
134
|
-
* If you want to use your own proxies, use the {@
|
|
134
|
+
* If you want to use your own proxies, use the {@link ProxyConfigurationOptions.proxyUrls} option. Your list of proxy URLs will
|
|
135
135
|
* be rotated by the configuration if this option is provided.
|
|
136
136
|
*
|
|
137
137
|
* **Example usage:**
|
|
@@ -164,7 +164,7 @@ export declare class ProxyConfiguration {
|
|
|
164
164
|
protected log: import("@apify/log").Log;
|
|
165
165
|
protected domainTiers: Map<string, ProxyTierTracker>;
|
|
166
166
|
/**
|
|
167
|
-
* Creates a {@
|
|
167
|
+
* Creates a {@link ProxyConfiguration} instance based on the provided options. Proxy servers are used to prevent target websites from
|
|
168
168
|
* blocking your crawlers based on IP address rate limits or blacklists. Setting proxy configuration in your crawlers automatically configures
|
|
169
169
|
* them to use the selected proxies for all connections.
|
|
170
170
|
*
|
|
@@ -185,16 +185,16 @@ export declare class ProxyConfiguration {
|
|
|
185
185
|
*/
|
|
186
186
|
constructor(options?: ProxyConfigurationOptions);
|
|
187
187
|
/**
|
|
188
|
-
* This function creates a new {@
|
|
188
|
+
* This function creates a new {@link ProxyInfo} info object.
|
|
189
189
|
* It is used by CheerioCrawler and PuppeteerCrawler to generate proxy URLs and also to allow the user to inspect
|
|
190
190
|
* the currently used proxy via the requestHandler parameter `proxyInfo`.
|
|
191
191
|
* Use it if you want to work with a rich representation of a proxy URL.
|
|
192
|
-
* If you need the URL string only, use {@
|
|
192
|
+
* If you need the URL string only, use {@link ProxyConfiguration.newUrl}.
|
|
193
193
|
* @param [sessionId]
|
|
194
|
-
* Represents the identifier of user {@
|
|
194
|
+
* Represents the identifier of user {@link Session} that can be managed by the {@link SessionPool} or
|
|
195
195
|
* you can use the Apify Proxy [Session](https://docs.apify.com/proxy#sessions) identifier.
|
|
196
196
|
* When the provided sessionId is a number, it's converted to a string. Property sessionId of
|
|
197
|
-
* {@
|
|
197
|
+
* {@link ProxyInfo} is always returned as a type string.
|
|
198
198
|
*
|
|
199
199
|
* All the HTTP requests going through the proxy with the same session identifier
|
|
200
200
|
* will use the same target proxy server (i.e. the same IP address).
|
|
@@ -218,7 +218,7 @@ export declare class ProxyConfiguration {
|
|
|
218
218
|
/**
|
|
219
219
|
* Returns a new proxy URL based on provided configuration options and the `sessionId` parameter.
|
|
220
220
|
* @param [sessionId]
|
|
221
|
-
* Represents the identifier of user {@
|
|
221
|
+
* Represents the identifier of user {@link Session} that can be managed by the {@link SessionPool} or
|
|
222
222
|
* you can use the Apify Proxy [Session](https://docs.apify.com/proxy#sessions) identifier.
|
|
223
223
|
* When the provided sessionId is a number, it's converted to a string.
|
|
224
224
|
*
|
package/proxy_configuration.js
CHANGED
|
@@ -68,9 +68,9 @@ class ProxyTierTracker {
|
|
|
68
68
|
* Configures connection to a proxy server with the provided options. Proxy servers are used to prevent target websites from blocking
|
|
69
69
|
* your crawlers based on IP address rate limits or blacklists. Setting proxy configuration in your crawlers automatically configures
|
|
70
70
|
* them to use the selected proxies for all connections. You can get information about the currently used proxy by inspecting
|
|
71
|
-
* the {@
|
|
71
|
+
* the {@link ProxyInfo} property in your crawler's page function. There, you can inspect the proxy's URL and other attributes.
|
|
72
72
|
*
|
|
73
|
-
* If you want to use your own proxies, use the {@
|
|
73
|
+
* If you want to use your own proxies, use the {@link ProxyConfigurationOptions.proxyUrls} option. Your list of proxy URLs will
|
|
74
74
|
* be rotated by the configuration if this option is provided.
|
|
75
75
|
*
|
|
76
76
|
* **Example usage:**
|
|
@@ -94,7 +94,7 @@ class ProxyTierTracker {
|
|
|
94
94
|
*/
|
|
95
95
|
class ProxyConfiguration {
|
|
96
96
|
/**
|
|
97
|
-
* Creates a {@
|
|
97
|
+
* Creates a {@link ProxyConfiguration} instance based on the provided options. Proxy servers are used to prevent target websites from
|
|
98
98
|
* blocking your crawlers based on IP address rate limits or blacklists. Setting proxy configuration in your crawlers automatically configures
|
|
99
99
|
* them to use the selected proxies for all connections.
|
|
100
100
|
*
|
|
@@ -178,16 +178,16 @@ class ProxyConfiguration {
|
|
|
178
178
|
this.tieredProxyUrls = tieredProxyUrls;
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
|
-
* This function creates a new {@
|
|
181
|
+
* This function creates a new {@link ProxyInfo} info object.
|
|
182
182
|
* It is used by CheerioCrawler and PuppeteerCrawler to generate proxy URLs and also to allow the user to inspect
|
|
183
183
|
* the currently used proxy via the requestHandler parameter `proxyInfo`.
|
|
184
184
|
* Use it if you want to work with a rich representation of a proxy URL.
|
|
185
|
-
* If you need the URL string only, use {@
|
|
185
|
+
* If you need the URL string only, use {@link ProxyConfiguration.newUrl}.
|
|
186
186
|
* @param [sessionId]
|
|
187
|
-
* Represents the identifier of user {@
|
|
187
|
+
* Represents the identifier of user {@link Session} that can be managed by the {@link SessionPool} or
|
|
188
188
|
* you can use the Apify Proxy [Session](https://docs.apify.com/proxy#sessions) identifier.
|
|
189
189
|
* When the provided sessionId is a number, it's converted to a string. Property sessionId of
|
|
190
|
-
* {@
|
|
190
|
+
* {@link ProxyInfo} is always returned as a type string.
|
|
191
191
|
*
|
|
192
192
|
* All the HTTP requests going through the proxy with the same session identifier
|
|
193
193
|
* will use the same target proxy server (i.e. the same IP address).
|
|
@@ -275,7 +275,7 @@ class ProxyConfiguration {
|
|
|
275
275
|
/**
|
|
276
276
|
* Returns a new proxy URL based on provided configuration options and the `sessionId` parameter.
|
|
277
277
|
* @param [sessionId]
|
|
278
|
-
* Represents the identifier of user {@
|
|
278
|
+
* Represents the identifier of user {@link Session} that can be managed by the {@link SessionPool} or
|
|
279
279
|
* you can use the Apify Proxy [Session](https://docs.apify.com/proxy#sessions) identifier.
|
|
280
280
|
* When the provided sessionId is a number, it's converted to a string.
|
|
281
281
|
*
|
package/request.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare enum RequestState {
|
|
|
19
19
|
* Each `Request` instance has the `uniqueKey` property, which can be either specified
|
|
20
20
|
* manually in the constructor or generated automatically from the URL. Two requests with the same `uniqueKey`
|
|
21
21
|
* are considered as pointing to the same web resource. This behavior applies to all Crawlee classes,
|
|
22
|
-
* such as {@
|
|
22
|
+
* such as {@link RequestList}, {@link RequestQueue}, {@link PuppeteerCrawler} or {@link PlaywrightCrawler}.
|
|
23
23
|
*
|
|
24
24
|
* > To access and examine the actual request sent over http, with all autofilled headers you can access
|
|
25
25
|
* `response.request` object from the request handler
|
|
@@ -52,7 +52,7 @@ export declare class Request<UserData extends Dictionary = Dictionary> {
|
|
|
52
52
|
* An actually loaded URL after redirects, if present. HTTP redirects are guaranteed
|
|
53
53
|
* to be included.
|
|
54
54
|
*
|
|
55
|
-
* When using {@
|
|
55
|
+
* When using {@link PuppeteerCrawler} or {@link PlaywrightCrawler}, meta tag and JavaScript redirects may,
|
|
56
56
|
* or may not be included, depending on their nature. This generally means that redirects,
|
|
57
57
|
* which happen immediately will most likely be included, but delayed redirects will not.
|
|
58
58
|
*/
|
|
@@ -131,7 +131,7 @@ export declare class Request<UserData extends Dictionary = Dictionary> {
|
|
|
131
131
|
static hashPayload(payload: BinaryLike): string;
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
|
-
* Specifies required and optional fields for constructing a {@
|
|
134
|
+
* Specifies required and optional fields for constructing a {@link Request}.
|
|
135
135
|
*/
|
|
136
136
|
export interface RequestOptions<UserData extends Dictionary = Dictionary> {
|
|
137
137
|
/** URL of the web page to crawl. It must be a non-empty string. */
|
package/request.js
CHANGED
|
@@ -48,7 +48,7 @@ var RequestState;
|
|
|
48
48
|
* Each `Request` instance has the `uniqueKey` property, which can be either specified
|
|
49
49
|
* manually in the constructor or generated automatically from the URL. Two requests with the same `uniqueKey`
|
|
50
50
|
* are considered as pointing to the same web resource. This behavior applies to all Crawlee classes,
|
|
51
|
-
* such as {@
|
|
51
|
+
* such as {@link RequestList}, {@link RequestQueue}, {@link PuppeteerCrawler} or {@link PlaywrightCrawler}.
|
|
52
52
|
*
|
|
53
53
|
* > To access and examine the actual request sent over http, with all autofilled headers you can access
|
|
54
54
|
* `response.request` object from the request handler
|
|
@@ -95,7 +95,7 @@ class Request {
|
|
|
95
95
|
* An actually loaded URL after redirects, if present. HTTP redirects are guaranteed
|
|
96
96
|
* to be included.
|
|
97
97
|
*
|
|
98
|
-
* When using {@
|
|
98
|
+
* When using {@link PuppeteerCrawler} or {@link PlaywrightCrawler}, meta tag and JavaScript redirects may,
|
|
99
99
|
* or may not be included, depending on their nature. This generally means that redirects,
|
|
100
100
|
* which happen immediately will most likely be included, but delayed redirects will not.
|
|
101
101
|
*/
|