@crawlee/playwright 3.7.1-beta.1 → 3.7.1-beta.10
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GlobInput, PseudoUrlInput, RegExpInput, RequestTransform, RequestProvider } from '@crawlee/browser';
|
|
2
2
|
import type { Dictionary, BatchAddRequestsResult } from '@crawlee/types';
|
|
3
|
-
// @ts-ignore optional peer dependency
|
|
3
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
4
4
|
import type { Page } from 'playwright';
|
|
5
5
|
type ClickOptions = Parameters<Page['click']>[1];
|
|
6
6
|
export interface EnqueueLinksByClickingElementsOptions {
|
|
@@ -2,13 +2,13 @@ import type { BrowserCrawlerOptions, BrowserCrawlingContext, BrowserHook, Browse
|
|
|
2
2
|
import { BrowserCrawler, Configuration } from '@crawlee/browser';
|
|
3
3
|
import type { PlaywrightController, PlaywrightPlugin } from '@crawlee/browser-pool';
|
|
4
4
|
import type { Dictionary } from '@crawlee/types';
|
|
5
|
-
// @ts-ignore optional peer dependency
|
|
5
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
6
6
|
import type { LaunchOptions, Page, Response } from 'playwright';
|
|
7
7
|
import type { PlaywrightLaunchContext } from './playwright-launcher';
|
|
8
8
|
import type { DirectNavigationOptions, PlaywrightContextUtils } from './utils/playwright-utils';
|
|
9
9
|
export interface PlaywrightCrawlingContext<UserData extends Dictionary = Dictionary> extends BrowserCrawlingContext<PlaywrightCrawler, Page, Response, PlaywrightController, UserData>, PlaywrightContextUtils {
|
|
10
10
|
}
|
|
11
|
-
// @ts-ignore optional peer dependency
|
|
11
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
12
12
|
export interface PlaywrightHook extends BrowserHook<PlaywrightCrawlingContext, PlaywrightGotoOptions> {
|
|
13
13
|
}
|
|
14
14
|
export interface PlaywrightRequestHandler extends BrowserRequestHandler<PlaywrightCrawlingContext> {
|
|
@@ -177,41 +177,77 @@ export declare class PlaywrightCrawler extends BrowserCrawler<{
|
|
|
177
177
|
}, LaunchOptions, PlaywrightCrawlingContext> {
|
|
178
178
|
readonly config: Configuration;
|
|
179
179
|
protected static optionsShape: {
|
|
180
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
180
181
|
browserPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
182
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
181
183
|
launcher: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
184
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
182
185
|
handlePageFunction: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
186
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
183
187
|
navigationTimeoutSecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
188
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
184
189
|
preNavigationHooks: import("ow").ArrayPredicate<unknown> & import("ow").BasePredicate<unknown[] | undefined>;
|
|
190
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
185
191
|
postNavigationHooks: import("ow").ArrayPredicate<unknown> & import("ow").BasePredicate<unknown[] | undefined>;
|
|
192
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
186
193
|
launchContext: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
194
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
187
195
|
headless: import("ow").AnyPredicate<string | boolean>;
|
|
196
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
188
197
|
sessionPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
198
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
189
199
|
persistCookiesPerSession: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
200
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
190
201
|
useSessionPool: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
202
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
191
203
|
proxyConfiguration: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
204
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
192
205
|
requestList: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
206
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
193
207
|
requestQueue: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
208
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
194
209
|
requestHandler: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
210
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
195
211
|
handleRequestFunction: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
212
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
196
213
|
requestHandlerTimeoutSecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
214
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
197
215
|
handleRequestTimeoutSecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
216
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
198
217
|
errorHandler: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
218
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
199
219
|
failedRequestHandler: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
220
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
200
221
|
handleFailedRequestFunction: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
222
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
201
223
|
maxRequestRetries: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
224
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
202
225
|
sameDomainDelaySecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
226
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
203
227
|
maxSessionRotations: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
228
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
204
229
|
maxRequestsPerCrawl: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
230
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
205
231
|
autoscaledPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
232
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
206
233
|
statusMessageLoggingInterval: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
234
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
207
235
|
statusMessageCallback: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
236
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
208
237
|
retryOnBlocked: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
238
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
209
239
|
minConcurrency: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
240
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
210
241
|
maxConcurrency: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
242
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
211
243
|
maxRequestsPerMinute: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
244
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
212
245
|
keepAlive: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
246
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
213
247
|
log: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
248
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
214
249
|
experiments: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
250
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
215
251
|
statisticsOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
216
252
|
};
|
|
217
253
|
/**
|
|
@@ -245,5 +281,6 @@ export declare class PlaywrightCrawler extends BrowserCrawler<{
|
|
|
245
281
|
* await crawler.run();
|
|
246
282
|
* ```
|
|
247
283
|
*/
|
|
284
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
248
285
|
export declare function createPlaywrightRouter<Context extends PlaywrightCrawlingContext = PlaywrightCrawlingContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, UserData>): import("@crawlee/browser").RouterHandler<Context>;
|
|
249
286
|
//# sourceMappingURL=playwright-crawler.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BrowserLaunchContext } from '@crawlee/browser';
|
|
2
2
|
import { BrowserLauncher, Configuration } from '@crawlee/browser';
|
|
3
3
|
import { PlaywrightPlugin } from '@crawlee/browser-pool';
|
|
4
|
-
// @ts-ignore optional peer dependency
|
|
4
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
5
5
|
import type { Browser, BrowserType, LaunchOptions } from 'playwright';
|
|
6
6
|
/**
|
|
7
7
|
* Apify extends the launch options of Playwright.
|
|
@@ -75,13 +75,21 @@ export interface PlaywrightLaunchContext extends BrowserLaunchContext<LaunchOpti
|
|
|
75
75
|
export declare class PlaywrightLauncher extends BrowserLauncher<PlaywrightPlugin> {
|
|
76
76
|
readonly config: Configuration;
|
|
77
77
|
protected static optionsShape: {
|
|
78
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
78
79
|
launcher: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
80
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
79
81
|
proxyUrl: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
82
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
80
83
|
useChrome: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
84
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
81
85
|
useIncognitoPages: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
86
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
82
87
|
experimentalContainers: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
88
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
83
89
|
userDataDir: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
90
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
84
91
|
launchOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
92
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
85
93
|
userAgent: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
86
94
|
};
|
|
87
95
|
/**
|
|
@@ -21,7 +21,7 @@ import type { Request } from '@crawlee/browser';
|
|
|
21
21
|
import { Configuration } from '@crawlee/browser';
|
|
22
22
|
import type { BatchAddRequestsResult } from '@crawlee/types';
|
|
23
23
|
import type { CheerioRoot, Dictionary } from '@crawlee/utils';
|
|
24
|
-
// @ts-ignore optional peer dependency
|
|
24
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
25
25
|
import type { Page, Response } from 'playwright';
|
|
26
26
|
import type { EnqueueLinksByClickingElementsOptions } from '../enqueue-links/click-elements';
|
|
27
27
|
import { enqueueLinksByClickingElements } from '../enqueue-links/click-elements';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/playwright",
|
|
3
|
-
"version": "3.7.1-beta.
|
|
3
|
+
"version": "3.7.1-beta.10",
|
|
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"
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@apify/datastructures": "^2.0.0",
|
|
57
57
|
"@apify/log": "^2.4.0",
|
|
58
|
-
"@crawlee/browser": "3.7.1-beta.
|
|
59
|
-
"@crawlee/browser-pool": "3.7.1-beta.
|
|
60
|
-
"@crawlee/types": "3.7.1-beta.
|
|
61
|
-
"@crawlee/utils": "3.7.1-beta.
|
|
58
|
+
"@crawlee/browser": "3.7.1-beta.10",
|
|
59
|
+
"@crawlee/browser-pool": "3.7.1-beta.10",
|
|
60
|
+
"@crawlee/types": "3.7.1-beta.10",
|
|
61
|
+
"@crawlee/utils": "3.7.1-beta.10",
|
|
62
62
|
"cheerio": "^1.0.0-rc.12",
|
|
63
63
|
"idcac-playwright": "^0.1.2",
|
|
64
64
|
"jquery": "^3.6.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "4660566073a815b613870e691b5eee096db7a71d"
|
|
84
84
|
}
|