@crawlee/impit-client 3.13.4-beta.3 → 3.13.4-beta.5
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/index.d.ts +15 -7
- package/index.d.ts.map +1 -1
- package/index.js +54 -41
- package/index.js.map +1 -1
- package/package.json +4 -3
- package/tsconfig.build.tsbuildinfo +1 -1
package/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { BaseHttpClient, HttpRequest, HttpResponse, ResponseTypes, StreamingHttpResponse } from '@crawlee/core';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
2
|
+
import type { ImpitOptions } from 'impit';
|
|
3
|
+
export declare const Browser: {
|
|
4
|
+
readonly Chrome: "chrome";
|
|
5
|
+
readonly Firefox: "firefox";
|
|
6
|
+
};
|
|
4
7
|
/**
|
|
5
8
|
* A HTTP client implementation based on the `impit library.
|
|
6
9
|
*/
|
|
@@ -8,19 +11,24 @@ export declare class ImpitHttpClient implements BaseHttpClient {
|
|
|
8
11
|
private impitOptions;
|
|
9
12
|
private maxRedirects;
|
|
10
13
|
private followRedirects;
|
|
14
|
+
/**
|
|
15
|
+
* Enables reuse of `impit` clients for the same set of options.
|
|
16
|
+
* This is useful for performance reasons, as creating
|
|
17
|
+
* a new client for each request breaks TCP connection
|
|
18
|
+
* (and other resources) reuse.
|
|
19
|
+
*/
|
|
20
|
+
private clientCache;
|
|
21
|
+
private getClient;
|
|
11
22
|
constructor(options?: Omit<ImpitOptions, 'proxyUrl'> & {
|
|
12
23
|
maxRedirects?: number;
|
|
13
24
|
});
|
|
14
|
-
/**
|
|
15
|
-
* Converts the body of a `HttpRequest` to a format that can be passed to `impit`.
|
|
16
|
-
*/
|
|
17
|
-
private intoImpitBody;
|
|
18
25
|
/**
|
|
19
26
|
* Flattens the headers of a `HttpRequest` to a format that can be passed to `impit`.
|
|
20
27
|
* @param headers `SimpleHeaders` object
|
|
21
28
|
* @returns `Record<string, string>` object
|
|
22
29
|
*/
|
|
23
|
-
private
|
|
30
|
+
private intoHeaders;
|
|
31
|
+
private intoImpitBody;
|
|
24
32
|
/**
|
|
25
33
|
* Common implementation for `sendRequest` and `stream` methods.
|
|
26
34
|
* @param request `HttpRequest` object
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,KAAK,EAAc,YAAY,EAA8B,MAAM,OAAO,CAAC;AAKlF,eAAO,MAAM,OAAO;;;CAGV,CAAC;AAOX;;GAEG;AACH,qBAAa,eAAgB,YAAW,cAAc;IAClD,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,eAAe,CAAU;IAEjC;;;;;OAKG;IACH,OAAO,CAAC,WAAW,CAAoD;IAEvE,OAAO,CAAC,SAAS;gBAaL,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE;IAOhF;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,aAAa;IAarB;;;;OAIG;YACW,WAAW;IAmDzB;;OAEG;IACG,WAAW,CAAC,aAAa,SAAS,MAAM,aAAa,EACvD,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC,GACpC,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IA+BvC,OAAO,CAAC,qBAAqB;IAqB7B;;OAEG;IACG,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAmBrE"}
|
package/index.js
CHANGED
|
@@ -2,15 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ImpitHttpClient = exports.Browser = void 0;
|
|
4
4
|
const node_stream_1 = require("node:stream");
|
|
5
|
-
const web_1 = require("node:stream/web");
|
|
6
5
|
const types_1 = require("node:util/types");
|
|
7
6
|
const impit_1 = require("impit");
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const datastructures_1 = require("@apify/datastructures");
|
|
8
|
+
exports.Browser = {
|
|
9
|
+
'Chrome': 'chrome',
|
|
10
|
+
'Firefox': 'firefox',
|
|
11
|
+
};
|
|
10
12
|
/**
|
|
11
13
|
* A HTTP client implementation based on the `impit library.
|
|
12
14
|
*/
|
|
13
15
|
class ImpitHttpClient {
|
|
16
|
+
getClient(options) {
|
|
17
|
+
const cacheKey = JSON.stringify(options);
|
|
18
|
+
if (this.clientCache.get(cacheKey)) {
|
|
19
|
+
return this.clientCache.get(cacheKey);
|
|
20
|
+
}
|
|
21
|
+
const client = new impit_1.Impit(options);
|
|
22
|
+
this.clientCache.add(cacheKey, client);
|
|
23
|
+
return client;
|
|
24
|
+
}
|
|
14
25
|
constructor(options) {
|
|
15
26
|
Object.defineProperty(this, "impitOptions", {
|
|
16
27
|
enumerable: true,
|
|
@@ -30,48 +41,51 @@ class ImpitHttpClient {
|
|
|
30
41
|
writable: true,
|
|
31
42
|
value: void 0
|
|
32
43
|
});
|
|
44
|
+
/**
|
|
45
|
+
* Enables reuse of `impit` clients for the same set of options.
|
|
46
|
+
* This is useful for performance reasons, as creating
|
|
47
|
+
* a new client for each request breaks TCP connection
|
|
48
|
+
* (and other resources) reuse.
|
|
49
|
+
*/
|
|
50
|
+
Object.defineProperty(this, "clientCache", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
configurable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
value: new datastructures_1.LruCache({ maxLength: 10 })
|
|
55
|
+
});
|
|
33
56
|
this.impitOptions = options ?? {};
|
|
34
57
|
this.maxRedirects = options?.maxRedirects ?? 10;
|
|
35
58
|
this.followRedirects = options?.followRedirects ?? true;
|
|
36
59
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Converts the body of a `HttpRequest` to a format that can be passed to `impit`.
|
|
39
|
-
*/
|
|
40
|
-
async intoImpitBody(body) {
|
|
41
|
-
if (typeof body === 'string' || (0, types_1.isTypedArray)(body)) {
|
|
42
|
-
return body;
|
|
43
|
-
}
|
|
44
|
-
if (body instanceof web_1.ReadableStream) {
|
|
45
|
-
const reader = body.getReader();
|
|
46
|
-
const buffer = new Uint8Array();
|
|
47
|
-
while (true) {
|
|
48
|
-
const { done, value } = await reader.read();
|
|
49
|
-
if (done)
|
|
50
|
-
return buffer;
|
|
51
|
-
buffer.set(value, buffer.length);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
throw new Error('Unsupported body type.');
|
|
55
|
-
}
|
|
56
60
|
/**
|
|
57
61
|
* Flattens the headers of a `HttpRequest` to a format that can be passed to `impit`.
|
|
58
62
|
* @param headers `SimpleHeaders` object
|
|
59
63
|
* @returns `Record<string, string>` object
|
|
60
64
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
intoHeaders(headers) {
|
|
66
|
+
if (!headers) {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
const result = new Headers();
|
|
63
70
|
for (const headerName of Object.keys(headers)) {
|
|
64
71
|
const headerValue = headers[headerName];
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
result
|
|
69
|
-
continue;
|
|
72
|
+
for (const value of Array.isArray(headerValue) ? headerValue : [headerValue]) {
|
|
73
|
+
if (value === undefined)
|
|
74
|
+
continue;
|
|
75
|
+
result.append(headerName, value);
|
|
70
76
|
}
|
|
71
|
-
result[headerName] = headerValue;
|
|
72
77
|
}
|
|
73
78
|
return result;
|
|
74
79
|
}
|
|
80
|
+
intoImpitBody(body) {
|
|
81
|
+
if ((0, types_1.isGeneratorObject)(body)) {
|
|
82
|
+
return node_stream_1.Readable.toWeb(node_stream_1.Readable.from(body));
|
|
83
|
+
}
|
|
84
|
+
if (body instanceof node_stream_1.Readable) {
|
|
85
|
+
return node_stream_1.Readable.toWeb(body);
|
|
86
|
+
}
|
|
87
|
+
return body;
|
|
88
|
+
}
|
|
75
89
|
/**
|
|
76
90
|
* Common implementation for `sendRequest` and `stream` methods.
|
|
77
91
|
* @param request `HttpRequest` object
|
|
@@ -82,29 +96,28 @@ class ImpitHttpClient {
|
|
|
82
96
|
throw new Error(`Too many redirects, maximum is ${this.maxRedirects}.`);
|
|
83
97
|
}
|
|
84
98
|
const url = typeof request.url === 'string' ? request.url : request.url.href;
|
|
85
|
-
const
|
|
86
|
-
const body = request.body !== undefined ? await this.intoImpitBody(request.body) : undefined;
|
|
87
|
-
const impit = new impit_1.Impit({
|
|
99
|
+
const impit = this.getClient({
|
|
88
100
|
...this.impitOptions,
|
|
89
101
|
proxyUrl: request.proxyUrl,
|
|
90
102
|
followRedirects: false,
|
|
91
103
|
});
|
|
92
104
|
const response = await impit.fetch(url, {
|
|
93
105
|
method: request.method,
|
|
94
|
-
headers,
|
|
95
|
-
body: body,
|
|
106
|
+
headers: this.intoHeaders(request.headers),
|
|
107
|
+
body: this.intoImpitBody(request.body),
|
|
96
108
|
});
|
|
97
109
|
if (this.followRedirects && response.status >= 300 && response.status < 400) {
|
|
98
|
-
const
|
|
110
|
+
const location = response.headers.get('location');
|
|
111
|
+
const redirectUrl = new URL(location ?? '', request.url);
|
|
99
112
|
if (!location) {
|
|
100
113
|
throw new Error('Redirect response missing location header.');
|
|
101
114
|
}
|
|
102
115
|
return this.getResponse({
|
|
103
116
|
...request,
|
|
104
|
-
url:
|
|
117
|
+
url: redirectUrl.href,
|
|
105
118
|
}, {
|
|
106
119
|
redirectCount: (redirects?.redirectCount ?? 0) + 1,
|
|
107
|
-
redirectUrls: [...(redirects?.redirectUrls ?? []),
|
|
120
|
+
redirectUrls: [...(redirects?.redirectUrls ?? []), redirectUrl],
|
|
108
121
|
});
|
|
109
122
|
}
|
|
110
123
|
return {
|
|
@@ -132,7 +145,7 @@ class ImpitHttpClient {
|
|
|
132
145
|
throw new Error('Unsupported response type.');
|
|
133
146
|
}
|
|
134
147
|
return {
|
|
135
|
-
headers: response.headers,
|
|
148
|
+
headers: Object.fromEntries(response.headers.entries()),
|
|
136
149
|
statusCode: response.status,
|
|
137
150
|
url: response.url,
|
|
138
151
|
request,
|
|
@@ -145,7 +158,7 @@ class ImpitHttpClient {
|
|
|
145
158
|
getStreamWithProgress(response) {
|
|
146
159
|
const responseStream = node_stream_1.Readable.fromWeb(response.body);
|
|
147
160
|
let transferred = 0;
|
|
148
|
-
const total = Number(response.headers
|
|
161
|
+
const total = Number(response.headers.get('content-length') ?? 0);
|
|
149
162
|
responseStream.on('data', (chunk) => {
|
|
150
163
|
transferred += chunk.length;
|
|
151
164
|
});
|
|
@@ -175,7 +188,7 @@ class ImpitHttpClient {
|
|
|
175
188
|
},
|
|
176
189
|
uploadProgress: { percent: 100, transferred: 0 },
|
|
177
190
|
redirectUrls,
|
|
178
|
-
headers: response.headers,
|
|
191
|
+
headers: Object.fromEntries(response.headers.entries()),
|
|
179
192
|
trailers: {},
|
|
180
193
|
};
|
|
181
194
|
}
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AAEvC,2CAAoD;AAIpD,iCAA8B;AAE9B,0DAAiD;AAEpC,QAAA,OAAO,GAAG;IACnB,QAAQ,EAAE,QAAQ;IAClB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AAQ,EAAE,YAAY,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QACnE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAE3E,OAAO;YACH,OAAO;YACP,GAAG,EAAE,QAAQ,CAAC,GAAG;YACjB,UAAU,EAAE,QAAQ,CAAC,MAAM;YAC3B,MAAM;YACN,QAAQ,EAAE,IAAI;YACd,IAAI,gBAAgB;gBAChB,OAAO,mBAAmB,EAAE,CAAC;YACjC,CAAC;YACD,cAAc,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,EAAE;YAChD,YAAY;YACZ,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACvD,QAAQ,EAAE,EAAE;SACf,CAAC;IACN,CAAC;CACJ;AAhND,0CAgNC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/impit-client",
|
|
3
|
-
"version": "3.13.4-beta.
|
|
3
|
+
"version": "3.13.4-beta.5",
|
|
4
4
|
"description": "impit-based HTTP client implementation for Crawlee. Impersonates browser requests to avoid bot detection.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.0.0"
|
|
@@ -59,7 +59,8 @@
|
|
|
59
59
|
"@crawlee/core": "^3.13.3"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"
|
|
62
|
+
"@apify/datastructures": "^2.0.3",
|
|
63
|
+
"impit": "^0.4.3"
|
|
63
64
|
},
|
|
64
65
|
"packageManager": "yarn@4.8.1",
|
|
65
66
|
"lerna": {
|
|
@@ -69,5 +70,5 @@
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
},
|
|
72
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "f6d22b3b7829b4e3aa2adb185bb51763298ee0c4"
|
|
73
74
|
}
|