@crawlee/impit-client 4.0.0-beta.14 → 4.0.0-beta.141
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 +14 -14
- package/index.d.ts +14 -35
- package/index.js +69 -110
- package/package.json +6 -10
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
<h1 align="center">
|
|
2
2
|
<a href="https://crawlee.dev">
|
|
3
3
|
<picture>
|
|
4
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-dark.svg?sanitize=true"
|
|
5
|
-
<img alt="Crawlee" src="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-light.svg?sanitize=true" width="500"
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-dark.svg?sanitize=true" />
|
|
5
|
+
<img alt="Crawlee" src="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-light.svg?sanitize=true" width="500" />
|
|
6
6
|
</picture>
|
|
7
7
|
</a>
|
|
8
|
-
<br
|
|
8
|
+
<br />
|
|
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"
|
|
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" width="250" height="55"/></a>
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
|
-
<p align=center>
|
|
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"
|
|
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"
|
|
19
|
-
<a href="https://discord.gg/jyEM2PRvMU" rel="nofollow"><img src="https://img.shields.io/discord/801163717915574323?label=discord" alt="Chat on discord" data-canonical-src="https://img.shields.io/discord/801163717915574323?label=discord"
|
|
20
|
-
<a href="https://github.com/apify/crawlee/actions/workflows/test-ci.yml"><img src="https://github.com/apify/crawlee/actions/workflows/test-ci.yml/badge.svg?branch=master" alt="Build Status"
|
|
16
|
+
<p align="center">
|
|
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" /></a>
|
|
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" /></a>
|
|
19
|
+
<a href="https://discord.gg/jyEM2PRvMU" rel="nofollow"><img src="https://img.shields.io/discord/801163717915574323?label=discord" alt="Chat on discord" data-canonical-src="https://img.shields.io/discord/801163717915574323?label=discord" /></a>
|
|
20
|
+
<a href="https://github.com/apify/crawlee/actions/workflows/test-ci.yml"><img src="https://github.com/apify/crawlee/actions/workflows/test-ci.yml/badge.svg?branch=master" alt="Build Status" /></a>
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
23
|
Crawlee covers your crawling and scraping end-to-end and **helps you build reliable scrapers. Fast.**
|
|
@@ -89,7 +89,7 @@ By default, Crawlee stores data to `./storage` in the current working directory.
|
|
|
89
89
|
We provide automated beta builds for every merged code change in Crawlee. You can find them in the npm [list of releases](https://www.npmjs.com/package/crawlee?activeTab=versions). If you want to test new features or bug fixes before we release them, feel free to install a beta build like this:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
npm install crawlee@
|
|
92
|
+
npm install crawlee@next
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
If you also use the [Apify SDK](https://github.com/apify/apify-sdk-js), you need to specify dependency overrides in your `package.json` file so that you don't end up with multiple versions of Crawlee installed:
|
|
@@ -98,9 +98,9 @@ If you also use the [Apify SDK](https://github.com/apify/apify-sdk-js), you need
|
|
|
98
98
|
{
|
|
99
99
|
"overrides": {
|
|
100
100
|
"apify": {
|
|
101
|
-
"@crawlee/core": "
|
|
102
|
-
"@crawlee/types": "
|
|
103
|
-
"@crawlee/utils": "
|
|
101
|
+
"@crawlee/core": "$crawlee",
|
|
102
|
+
"@crawlee/types": "$crawlee",
|
|
103
|
+
"@crawlee/utils": "$crawlee"
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,48 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { CustomFetchOptions } from '@crawlee/http-client';
|
|
2
|
+
import { BaseHttpClient } from '@crawlee/http-client';
|
|
3
|
+
import type { CrawleeLogger } from '@crawlee/types';
|
|
4
|
+
import { type ImpitOptions } from 'impit';
|
|
3
5
|
export declare const Browser: {
|
|
4
6
|
readonly Chrome: "chrome";
|
|
5
7
|
readonly Firefox: "firefox";
|
|
6
8
|
};
|
|
7
9
|
/**
|
|
8
|
-
* A HTTP client implementation based on the `impit library.
|
|
10
|
+
* A HTTP client implementation based on the `impit` library.
|
|
9
11
|
*/
|
|
10
|
-
export declare class ImpitHttpClient
|
|
11
|
-
private
|
|
12
|
-
private maxRedirects;
|
|
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;
|
|
12
|
+
export declare class ImpitHttpClient extends BaseHttpClient {
|
|
13
|
+
#private;
|
|
21
14
|
private getClient;
|
|
22
|
-
constructor(options?: Omit<ImpitOptions, 'proxyUrl'> & {
|
|
23
|
-
maxRedirects?: number;
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* Flattens the headers of a `HttpRequest` to a format that can be passed to `impit`.
|
|
27
|
-
* @param headers `SimpleHeaders` object
|
|
28
|
-
* @returns `Record<string, string>` object
|
|
29
|
-
*/
|
|
30
|
-
private intoHeaders;
|
|
31
|
-
private intoImpitBody;
|
|
32
15
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @param request `HttpRequest` object
|
|
35
|
-
* @returns `HttpResponse` object
|
|
16
|
+
* @param options.cacheClients Whether to cache `impit` clients between requests. Defaults to `true`.
|
|
36
17
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
sendRequest<TResponseType extends keyof ResponseTypes>(request: HttpRequest<TResponseType>): Promise<Response>;
|
|
42
|
-
private getStreamWithProgress;
|
|
18
|
+
constructor(options?: Omit<ImpitOptions, 'proxyUrl' | 'timeout'> & {
|
|
19
|
+
cacheClients?: boolean;
|
|
20
|
+
logger?: CrawleeLogger;
|
|
21
|
+
});
|
|
43
22
|
/**
|
|
44
23
|
* @inheritDoc
|
|
45
24
|
*/
|
|
46
|
-
|
|
25
|
+
fetch(request: Request, options?: RequestInit & CustomFetchOptions): Promise<Response>;
|
|
26
|
+
private resolveImpitBrowser;
|
|
47
27
|
}
|
|
48
|
-
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,144 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isGeneratorObject } from 'node:util/types';
|
|
3
|
-
import { ResponseWithUrl } from '@crawlee/core';
|
|
1
|
+
import { BaseHttpClient, ResponseWithUrl } from '@crawlee/http-client';
|
|
4
2
|
import { Impit } from 'impit';
|
|
5
3
|
import { LruCache } from '@apify/datastructures';
|
|
4
|
+
// Concrete impit impersonation profiles per browser family. The plain `chrome` /
|
|
5
|
+
// `firefox` aliases fall back to the oldest available version, which is a
|
|
6
|
+
// fingerprint giveaway — we pick one of these explicitly instead. Keep in sync
|
|
7
|
+
// with impit's `Browser` type when bumping the dependency.
|
|
8
|
+
const IMPIT_VERSIONS_BY_BROWSER = {
|
|
9
|
+
chrome: [
|
|
10
|
+
'chrome100',
|
|
11
|
+
'chrome101',
|
|
12
|
+
'chrome104',
|
|
13
|
+
'chrome107',
|
|
14
|
+
'chrome110',
|
|
15
|
+
'chrome116',
|
|
16
|
+
'chrome124',
|
|
17
|
+
'chrome125',
|
|
18
|
+
'chrome131',
|
|
19
|
+
'chrome136',
|
|
20
|
+
'chrome142',
|
|
21
|
+
],
|
|
22
|
+
firefox: ['firefox128', 'firefox133', 'firefox135', 'firefox144'],
|
|
23
|
+
};
|
|
6
24
|
export const Browser = {
|
|
7
25
|
'Chrome': 'chrome',
|
|
8
26
|
'Firefox': 'firefox',
|
|
9
27
|
};
|
|
10
28
|
/**
|
|
11
|
-
* A HTTP client implementation based on the `impit library.
|
|
29
|
+
* A HTTP client implementation based on the `impit` library.
|
|
12
30
|
*/
|
|
13
|
-
export class ImpitHttpClient {
|
|
14
|
-
impitOptions;
|
|
15
|
-
|
|
16
|
-
followRedirects;
|
|
31
|
+
export class ImpitHttpClient extends BaseHttpClient {
|
|
32
|
+
#impitOptions;
|
|
33
|
+
#cacheClients;
|
|
17
34
|
/**
|
|
18
35
|
* Enables reuse of `impit` clients for the same set of options.
|
|
19
36
|
* This is useful for performance reasons, as creating
|
|
20
37
|
* a new client for each request breaks TCP connection
|
|
21
38
|
* (and other resources) reuse.
|
|
22
39
|
*/
|
|
23
|
-
clientCache = new LruCache({ maxLength: 10 });
|
|
40
|
+
#clientCache = new LruCache({ maxLength: 10 });
|
|
41
|
+
/**
|
|
42
|
+
* Stable impit impersonation version per fingerprint object, so the same
|
|
43
|
+
* session keeps impersonating the same browser version across requests
|
|
44
|
+
* instead of rerolling on every call.
|
|
45
|
+
*/
|
|
46
|
+
#impitBrowserByFingerprint = new WeakMap();
|
|
24
47
|
getClient(options) {
|
|
48
|
+
if (!this.#cacheClients) {
|
|
49
|
+
return new Impit(options);
|
|
50
|
+
}
|
|
25
51
|
const { cookieJar, ...rest } = options;
|
|
26
52
|
const cacheKey = JSON.stringify(rest);
|
|
27
|
-
const existingClient = this
|
|
53
|
+
const existingClient = this.#clientCache.get(cacheKey);
|
|
28
54
|
if (existingClient && (!cookieJar || existingClient.cookieJar === cookieJar)) {
|
|
29
55
|
return existingClient.client;
|
|
30
56
|
}
|
|
31
57
|
const client = new Impit(options);
|
|
32
|
-
this
|
|
58
|
+
this.#clientCache.add(cacheKey, { client, cookieJar: cookieJar });
|
|
33
59
|
return client;
|
|
34
60
|
}
|
|
35
|
-
constructor(options) {
|
|
36
|
-
this.impitOptions = options ?? {};
|
|
37
|
-
this.maxRedirects = options?.maxRedirects ?? 10;
|
|
38
|
-
this.followRedirects = options?.followRedirects ?? true;
|
|
39
|
-
}
|
|
40
61
|
/**
|
|
41
|
-
*
|
|
42
|
-
* @param headers `SimpleHeaders` object
|
|
43
|
-
* @returns `Record<string, string>` object
|
|
62
|
+
* @param options.cacheClients Whether to cache `impit` clients between requests. Defaults to `true`.
|
|
44
63
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
for (const headerName of Object.keys(headers)) {
|
|
51
|
-
const headerValue = headers[headerName];
|
|
52
|
-
for (const value of Array.isArray(headerValue) ? headerValue : [headerValue]) {
|
|
53
|
-
if (value === undefined)
|
|
54
|
-
continue;
|
|
55
|
-
result.append(headerName, value);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return result;
|
|
59
|
-
}
|
|
60
|
-
intoImpitBody(body) {
|
|
61
|
-
if (isGeneratorObject(body)) {
|
|
62
|
-
return Readable.toWeb(Readable.from(body));
|
|
63
|
-
}
|
|
64
|
-
if (body instanceof Readable) {
|
|
65
|
-
return Readable.toWeb(body);
|
|
66
|
-
}
|
|
67
|
-
return body;
|
|
64
|
+
constructor(options) {
|
|
65
|
+
super({ logger: options?.logger });
|
|
66
|
+
const { cacheClients = true, logger: _logger, ...impitOptions } = options ?? {};
|
|
67
|
+
this.#impitOptions = impitOptions;
|
|
68
|
+
this.#cacheClients = cacheClients;
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @param request `HttpRequest` object
|
|
72
|
-
* @returns `HttpResponse` object
|
|
71
|
+
* @inheritDoc
|
|
73
72
|
*/
|
|
74
|
-
async
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
const url = typeof request.url === 'string' ? request.url : request.url.href;
|
|
73
|
+
async fetch(request, options) {
|
|
74
|
+
const { proxyUrl, redirect, signal, fingerprint, ignoreTlsErrors } = options ?? {};
|
|
75
|
+
const impitBrowser = this.resolveImpitBrowser(fingerprint);
|
|
79
76
|
const impit = this.getClient({
|
|
80
|
-
...this
|
|
81
|
-
...(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
headers: this.intoHeaders(request.headers),
|
|
88
|
-
body: this.intoImpitBody(request.body),
|
|
89
|
-
timeout: request.timeout?.request,
|
|
77
|
+
...this.#impitOptions,
|
|
78
|
+
...(impitBrowser ? { browser: impitBrowser } : {}),
|
|
79
|
+
// The per-request flag (from the crawler option or a MITM proxy session)
|
|
80
|
+
// can only enable ignoring, never override a constructor-level `true`.
|
|
81
|
+
...(ignoreTlsErrors ? { ignoreTlsErrors: true } : {}),
|
|
82
|
+
proxyUrl,
|
|
83
|
+
followRedirects: redirect === 'follow',
|
|
90
84
|
});
|
|
91
|
-
|
|
92
|
-
const location = response.headers.get('location');
|
|
93
|
-
const redirectUrl = new URL(location ?? '', request.url);
|
|
94
|
-
if (!location) {
|
|
95
|
-
throw new Error('Redirect response missing location header.');
|
|
96
|
-
}
|
|
97
|
-
return this.getResponse({
|
|
98
|
-
...request,
|
|
99
|
-
url: redirectUrl.href,
|
|
100
|
-
}, {
|
|
101
|
-
redirectCount: (redirects?.redirectCount ?? 0) + 1,
|
|
102
|
-
redirectUrls: [...(redirects?.redirectUrls ?? []), redirectUrl],
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
return {
|
|
106
|
-
response,
|
|
107
|
-
redirectUrls: redirects?.redirectUrls ?? [],
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* @inheritDoc
|
|
112
|
-
*/
|
|
113
|
-
async sendRequest(request) {
|
|
114
|
-
const { response } = await this.getResponse(request);
|
|
85
|
+
const response = await impit.fetch(request, { signal: signal ?? undefined });
|
|
115
86
|
// todo - cast shouldn't be needed here, impit returns `Uint8Array`
|
|
116
|
-
return new ResponseWithUrl(
|
|
87
|
+
return new ResponseWithUrl(response.body, response);
|
|
117
88
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
};
|
|
132
|
-
return [responseStream, getDownloadProgress];
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* @inheritDoc
|
|
136
|
-
*/
|
|
137
|
-
async stream(request) {
|
|
138
|
-
const { response } = await this.getResponse(request);
|
|
139
|
-
const [stream] = this.getStreamWithProgress(response);
|
|
140
|
-
// Cast shouldn't be needed here, undici might have a slightly different `ReadableStream` type
|
|
141
|
-
return new ResponseWithUrl(Readable.toWeb(stream), response);
|
|
89
|
+
resolveImpitBrowser(fingerprint) {
|
|
90
|
+
if (!fingerprint?.browser)
|
|
91
|
+
return undefined;
|
|
92
|
+
const cached = this.#impitBrowserByFingerprint.get(fingerprint);
|
|
93
|
+
if (cached)
|
|
94
|
+
return cached;
|
|
95
|
+
// impit can only impersonate Chrome and Firefox. Map other (Chromium-based or
|
|
96
|
+
// unsupported) families like `edge`/`safari` onto Chrome so the request still
|
|
97
|
+
// carries realistic browser headers instead of impit's bare `*/*` defaults.
|
|
98
|
+
const versions = IMPIT_VERSIONS_BY_BROWSER[fingerprint.browser] ?? IMPIT_VERSIONS_BY_BROWSER.chrome;
|
|
99
|
+
const picked = versions[Math.floor(Math.random() * versions.length)];
|
|
100
|
+
this.#impitBrowserByFingerprint.set(fingerprint, picked);
|
|
101
|
+
return picked;
|
|
142
102
|
}
|
|
143
103
|
}
|
|
144
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/impit-client",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.141",
|
|
4
4
|
"description": "impit-based HTTP client implementation for Crawlee. Impersonates browser requests to avoid bot detection.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://crawlee.dev",
|
|
40
40
|
"scripts": {
|
|
41
|
-
"build": "
|
|
41
|
+
"build": "pnpm clean && pnpm compile && pnpm copy",
|
|
42
42
|
"clean": "rimraf ./dist",
|
|
43
43
|
"compile": "tsc -p tsconfig.build.json",
|
|
44
44
|
"copy": "tsx ../../scripts/copy.ts"
|
|
@@ -46,15 +46,11 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"peerDependencies": {
|
|
50
|
-
"@crawlee/core": "4.0.0"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@crawlee/core": "4.0.0"
|
|
54
|
-
},
|
|
55
49
|
"dependencies": {
|
|
56
50
|
"@apify/datastructures": "^2.0.3",
|
|
57
|
-
"
|
|
51
|
+
"@crawlee/http-client": "4.0.0-beta.141",
|
|
52
|
+
"@crawlee/types": "4.0.0-beta.141",
|
|
53
|
+
"impit": "^0.14.2",
|
|
58
54
|
"tough-cookie": "^6.0.0"
|
|
59
55
|
},
|
|
60
56
|
"lerna": {
|
|
@@ -64,5 +60,5 @@
|
|
|
64
60
|
}
|
|
65
61
|
}
|
|
66
62
|
},
|
|
67
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "6f97ccc5beda6b4ec0455b26323dba311a5799e4"
|
|
68
64
|
}
|
package/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAmB,MAAM,eAAe,CAAC;AAC3G,OAAO,KAAK,EAAc,YAAY,EAA8B,MAAM,OAAO,CAAC;AAMlF,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,CAA2F;IAE9G,OAAO,CAAC,SAAS;gBAgBL,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;IAqDzB;;OAEG;IACG,WAAW,CAAC,aAAa,SAAS,MAAM,aAAa,EACvD,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC,GACpC,OAAO,CAAC,QAAQ,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