@crawlee/puppeteer 3.7.1-beta.4 → 3.7.1-beta.6
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 { ClickOptions, Page, Target } from 'puppeteer';
|
|
5
5
|
export interface EnqueueLinksByClickingElementsOptions {
|
|
6
6
|
/**
|
|
@@ -2,13 +2,13 @@ import type { BrowserCrawlerOptions, BrowserCrawlingContext, BrowserHook, Browse
|
|
|
2
2
|
import { BrowserCrawler, Configuration } from '@crawlee/browser';
|
|
3
3
|
import type { PuppeteerController, PuppeteerPlugin } 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 { HTTPResponse, LaunchOptions, Page } from 'puppeteer';
|
|
7
7
|
import type { PuppeteerLaunchContext } from './puppeteer-launcher';
|
|
8
8
|
import type { DirectNavigationOptions, PuppeteerContextUtils } from './utils/puppeteer_utils';
|
|
9
9
|
export interface PuppeteerCrawlingContext<UserData extends Dictionary = Dictionary> extends BrowserCrawlingContext<PuppeteerCrawler, Page, HTTPResponse, PuppeteerController, UserData>, PuppeteerContextUtils {
|
|
10
10
|
}
|
|
11
|
-
// @ts-ignore optional peer dependency
|
|
11
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
12
12
|
export interface PuppeteerHook extends BrowserHook<PuppeteerCrawlingContext, PuppeteerGoToOptions> {
|
|
13
13
|
}
|
|
14
14
|
export interface PuppeteerRequestHandler extends BrowserRequestHandler<PuppeteerCrawlingContext> {
|
|
@@ -124,40 +124,75 @@ export declare class PuppeteerCrawler extends BrowserCrawler<{
|
|
|
124
124
|
}, LaunchOptions, PuppeteerCrawlingContext> {
|
|
125
125
|
readonly config: Configuration;
|
|
126
126
|
protected static optionsShape: {
|
|
127
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
127
128
|
browserPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
129
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
128
130
|
handlePageFunction: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
131
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
129
132
|
navigationTimeoutSecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
133
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
130
134
|
preNavigationHooks: import("ow").ArrayPredicate<unknown> & import("ow").BasePredicate<unknown[] | undefined>;
|
|
135
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
131
136
|
postNavigationHooks: import("ow").ArrayPredicate<unknown> & import("ow").BasePredicate<unknown[] | undefined>;
|
|
137
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
132
138
|
launchContext: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
139
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
133
140
|
headless: import("ow").AnyPredicate<string | boolean>;
|
|
141
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
134
142
|
sessionPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
143
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
135
144
|
persistCookiesPerSession: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
145
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
136
146
|
useSessionPool: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
147
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
137
148
|
proxyConfiguration: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
149
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
138
150
|
requestList: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
151
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
139
152
|
requestQueue: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
153
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
140
154
|
requestHandler: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
155
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
141
156
|
handleRequestFunction: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
157
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
142
158
|
requestHandlerTimeoutSecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
159
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
143
160
|
handleRequestTimeoutSecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
161
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
144
162
|
errorHandler: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
163
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
145
164
|
failedRequestHandler: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
165
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
146
166
|
handleFailedRequestFunction: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
167
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
147
168
|
maxRequestRetries: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
169
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
148
170
|
sameDomainDelaySecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
171
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
149
172
|
maxSessionRotations: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
173
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
150
174
|
maxRequestsPerCrawl: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
175
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
151
176
|
autoscaledPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
177
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
152
178
|
statusMessageLoggingInterval: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
179
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
153
180
|
statusMessageCallback: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
181
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
154
182
|
retryOnBlocked: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
183
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
155
184
|
minConcurrency: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
185
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
156
186
|
maxConcurrency: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
187
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
157
188
|
maxRequestsPerMinute: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
189
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
158
190
|
keepAlive: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
191
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
159
192
|
log: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
193
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
160
194
|
experiments: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
195
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
161
196
|
statisticsOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
162
197
|
};
|
|
163
198
|
/**
|
|
@@ -191,5 +226,6 @@ export declare class PuppeteerCrawler extends BrowserCrawler<{
|
|
|
191
226
|
* await crawler.run();
|
|
192
227
|
* ```
|
|
193
228
|
*/
|
|
229
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
194
230
|
export declare function createPuppeteerRouter<Context extends PuppeteerCrawlingContext = PuppeteerCrawlingContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, UserData>): import("@crawlee/browser").RouterHandler<Context>;
|
|
195
231
|
//# sourceMappingURL=puppeteer-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 { PuppeteerPlugin } 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 } from 'puppeteer';
|
|
6
6
|
/**
|
|
7
7
|
* Apify extends the launch options of Puppeteer.
|
|
@@ -68,13 +68,21 @@ export interface PuppeteerLaunchContext extends BrowserLaunchContext<PuppeteerPl
|
|
|
68
68
|
export declare class PuppeteerLauncher extends BrowserLauncher<PuppeteerPlugin, unknown> {
|
|
69
69
|
readonly config: Configuration;
|
|
70
70
|
protected static optionsShape: {
|
|
71
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
71
72
|
launcher: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
73
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
72
74
|
proxyUrl: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
75
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
73
76
|
useChrome: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
77
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
74
78
|
useIncognitoPages: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
79
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
75
80
|
experimentalContainers: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
81
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
76
82
|
userDataDir: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
83
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
77
84
|
launchOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
85
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
78
86
|
userAgent: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
79
87
|
};
|
|
80
88
|
/**
|
|
@@ -22,7 +22,7 @@ import { Configuration } from '@crawlee/browser';
|
|
|
22
22
|
import type { Dictionary, BatchAddRequestsResult } from '@crawlee/types';
|
|
23
23
|
import type { CheerioRoot } from '@crawlee/utils';
|
|
24
24
|
import type { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping.js';
|
|
25
|
-
// @ts-ignore optional peer dependency
|
|
25
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
26
26
|
import type { Page, HTTPResponse, ResponseForRequest } from 'puppeteer';
|
|
27
27
|
import type { InterceptHandler } from './puppeteer_request_interception';
|
|
28
28
|
import { addInterceptRequestHandler, removeInterceptRequestHandler } from './puppeteer_request_interception';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/puppeteer",
|
|
3
|
-
"version": "3.7.1-beta.
|
|
3
|
+
"version": "3.7.1-beta.6",
|
|
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.6",
|
|
59
|
+
"@crawlee/browser-pool": "3.7.1-beta.6",
|
|
60
|
+
"@crawlee/types": "3.7.1-beta.6",
|
|
61
|
+
"@crawlee/utils": "3.7.1-beta.6",
|
|
62
62
|
"cheerio": "^1.0.0-rc.12",
|
|
63
63
|
"devtools-protocol": "*",
|
|
64
64
|
"idcac-playwright": "^0.1.2",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "01664e58799374a6acc2aa9db397566c1acc69d4"
|
|
85
85
|
}
|