@crawlee/jsdom 3.7.1-beta.5 → 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.
- package/internals/jsdom-crawler.d.ts +46 -0
- package/package.json +4 -4
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
1
2
|
/// <reference types="node" />
|
|
3
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
2
4
|
/// <reference types="node/http" />
|
|
5
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
3
6
|
/// <reference types="node_modules/got/dist/source/core/timed-out" />
|
|
4
7
|
import type { IncomingMessage } from 'http';
|
|
5
8
|
import type { EnqueueLinksOptions, ErrorHandler, GetUserDataFromRequest, HttpCrawlerOptions, InternalHttpCrawlingContext, InternalHttpHook, RequestHandler, RouterRoutes, Configuration, RequestProvider } from '@crawlee/http';
|
|
@@ -44,45 +47,85 @@ export type JSDOMRequestHandler<UserData extends Dictionary = any, // with defau
|
|
|
44
47
|
JSONData extends Dictionary = any> = RequestHandler<JSDOMCrawlingContext<UserData, JSONData>>;
|
|
45
48
|
export declare class JSDOMCrawler extends HttpCrawler<JSDOMCrawlingContext> {
|
|
46
49
|
protected static optionsShape: {
|
|
50
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
47
51
|
runScripts: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
52
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
48
53
|
hideInternalConsole: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
54
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
49
55
|
handlePageFunction: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
56
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
50
57
|
navigationTimeoutSecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
58
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
51
59
|
ignoreSslErrors: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
60
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
52
61
|
additionalMimeTypes: import("ow").ArrayPredicate<string>;
|
|
62
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
53
63
|
suggestResponseEncoding: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
64
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
54
65
|
forceResponseEncoding: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
66
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
55
67
|
proxyConfiguration: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
68
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
56
69
|
persistCookiesPerSession: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
70
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
57
71
|
additionalHttpErrorStatusCodes: import("ow").ArrayPredicate<number>;
|
|
72
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
58
73
|
ignoreHttpErrorStatusCodes: import("ow").ArrayPredicate<number>;
|
|
74
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
59
75
|
preNavigationHooks: import("ow").ArrayPredicate<unknown> & import("ow").BasePredicate<unknown[] | undefined>;
|
|
76
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
60
77
|
postNavigationHooks: import("ow").ArrayPredicate<unknown> & import("ow").BasePredicate<unknown[] | undefined>;
|
|
78
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
61
79
|
requestList: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
80
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
62
81
|
requestQueue: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
82
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
63
83
|
requestHandler: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
84
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
64
85
|
handleRequestFunction: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
86
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
65
87
|
requestHandlerTimeoutSecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
88
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
66
89
|
handleRequestTimeoutSecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
90
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
67
91
|
errorHandler: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
92
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
68
93
|
failedRequestHandler: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
94
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
69
95
|
handleFailedRequestFunction: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
96
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
70
97
|
maxRequestRetries: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
98
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
71
99
|
sameDomainDelaySecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
100
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
72
101
|
maxSessionRotations: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
102
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
73
103
|
maxRequestsPerCrawl: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
104
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
74
105
|
autoscaledPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
106
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
75
107
|
sessionPoolOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
108
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
76
109
|
useSessionPool: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
110
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
77
111
|
statusMessageLoggingInterval: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
112
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
78
113
|
statusMessageCallback: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
114
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
79
115
|
retryOnBlocked: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
116
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
80
117
|
minConcurrency: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
118
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
81
119
|
maxConcurrency: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
120
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
82
121
|
maxRequestsPerMinute: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
122
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
83
123
|
keepAlive: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
124
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
84
125
|
log: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
126
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
85
127
|
experiments: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
128
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
86
129
|
statisticsOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
87
130
|
};
|
|
88
131
|
protected runScripts: boolean;
|
|
@@ -110,6 +153,7 @@ export declare class JSDOMCrawler extends HttpCrawler<JSDOMCrawlingContext> {
|
|
|
110
153
|
window: DOMWindow;
|
|
111
154
|
readonly body: string;
|
|
112
155
|
readonly document: Document;
|
|
156
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
113
157
|
enqueueLinks: (enqueueOptions?: EnqueueLinksOptions) => Promise<import("@crawlee/types").BatchAddRequestsResult>;
|
|
114
158
|
}>;
|
|
115
159
|
_runRequestHandler(context: JSDOMCrawlingContext): Promise<void>;
|
|
@@ -122,6 +166,7 @@ interface EnqueueLinksInternalOptions {
|
|
|
122
166
|
finalRequestUrl?: string;
|
|
123
167
|
}
|
|
124
168
|
/** @internal */
|
|
169
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
125
170
|
export declare function domCrawlerEnqueueLinks({ options, window, requestQueue, originalRequestUrl, finalRequestUrl }: EnqueueLinksInternalOptions): Promise<import("@crawlee/types").BatchAddRequestsResult>;
|
|
126
171
|
/**
|
|
127
172
|
* Creates new {@apilink Router} instance that works based on request labels.
|
|
@@ -147,6 +192,7 @@ export declare function domCrawlerEnqueueLinks({ options, window, requestQueue,
|
|
|
147
192
|
* await crawler.run();
|
|
148
193
|
* ```
|
|
149
194
|
*/
|
|
195
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
150
196
|
export declare function createJSDOMRouter<Context extends JSDOMCrawlingContext = JSDOMCrawlingContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, UserData>): import("@crawlee/http").RouterHandler<Context>;
|
|
151
197
|
export {};
|
|
152
198
|
//# sourceMappingURL=jsdom-crawler.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/jsdom",
|
|
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,8 +55,8 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@apify/timeout": "^0.3.0",
|
|
57
57
|
"@apify/utilities": "^2.7.10",
|
|
58
|
-
"@crawlee/http": "3.7.1-beta.
|
|
59
|
-
"@crawlee/types": "3.7.1-beta.
|
|
58
|
+
"@crawlee/http": "3.7.1-beta.6",
|
|
59
|
+
"@crawlee/types": "3.7.1-beta.6",
|
|
60
60
|
"@types/jsdom": "^21.0.0",
|
|
61
61
|
"cheerio": "^1.0.0-rc.12",
|
|
62
62
|
"jsdom": "^23.0.0",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "01664e58799374a6acc2aa9db397566c1acc69d4"
|
|
74
74
|
}
|