@isdk/web-fetcher 0.2.12 → 0.3.1
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.action.cn.md +197 -155
- package/README.action.extract.cn.md +263 -0
- package/README.action.extract.md +263 -0
- package/README.action.md +202 -147
- package/README.cn.md +25 -15
- package/README.engine.cn.md +118 -14
- package/README.engine.md +115 -14
- package/README.md +19 -10
- package/dist/index.d.mts +667 -50
- package/dist/index.d.ts +667 -50
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/README.md +19 -10
- package/docs/_media/README.action.md +202 -147
- package/docs/_media/README.cn.md +25 -15
- package/docs/_media/README.engine.md +115 -14
- package/docs/classes/CheerioFetchEngine.md +805 -135
- package/docs/classes/ClickAction.md +33 -33
- package/docs/classes/EvaluateAction.md +559 -0
- package/docs/classes/ExtractAction.md +33 -33
- package/docs/classes/FetchAction.md +39 -33
- package/docs/classes/FetchEngine.md +660 -122
- package/docs/classes/FetchSession.md +38 -16
- package/docs/classes/FillAction.md +33 -33
- package/docs/classes/GetContentAction.md +33 -33
- package/docs/classes/GotoAction.md +33 -33
- package/docs/classes/KeyboardPressAction.md +533 -0
- package/docs/classes/KeyboardTypeAction.md +533 -0
- package/docs/classes/MouseClickAction.md +533 -0
- package/docs/classes/MouseMoveAction.md +533 -0
- package/docs/classes/PauseAction.md +33 -33
- package/docs/classes/PlaywrightFetchEngine.md +820 -122
- package/docs/classes/SubmitAction.md +33 -33
- package/docs/classes/TrimAction.md +533 -0
- package/docs/classes/WaitForAction.md +33 -33
- package/docs/classes/WebFetcher.md +9 -9
- package/docs/enumerations/FetchActionResultStatus.md +4 -4
- package/docs/functions/fetchWeb.md +6 -6
- package/docs/globals.md +14 -0
- package/docs/interfaces/BaseFetchActionProperties.md +12 -12
- package/docs/interfaces/BaseFetchCollectorActionProperties.md +16 -16
- package/docs/interfaces/BaseFetcherProperties.md +32 -28
- package/docs/interfaces/Cookie.md +14 -14
- package/docs/interfaces/DispatchedEngineAction.md +4 -4
- package/docs/interfaces/EvaluateActionOptions.md +81 -0
- package/docs/interfaces/ExtractActionProperties.md +12 -12
- package/docs/interfaces/FetchActionInContext.md +15 -15
- package/docs/interfaces/FetchActionProperties.md +13 -13
- package/docs/interfaces/FetchActionResult.md +6 -6
- package/docs/interfaces/FetchContext.md +42 -38
- package/docs/interfaces/FetchEngineContext.md +37 -33
- package/docs/interfaces/FetchMetadata.md +5 -5
- package/docs/interfaces/FetchResponse.md +14 -14
- package/docs/interfaces/FetchReturnTypeRegistry.md +8 -8
- package/docs/interfaces/FetchSite.md +35 -31
- package/docs/interfaces/FetcherOptions.md +34 -30
- package/docs/interfaces/GotoActionOptions.md +14 -6
- package/docs/interfaces/KeyboardPressParams.md +25 -0
- package/docs/interfaces/KeyboardTypeParams.md +25 -0
- package/docs/interfaces/MouseClickParams.md +49 -0
- package/docs/interfaces/MouseMoveParams.md +41 -0
- package/docs/interfaces/PendingEngineRequest.md +3 -3
- package/docs/interfaces/StorageOptions.md +5 -5
- package/docs/interfaces/SubmitActionOptions.md +2 -2
- package/docs/interfaces/TrimActionOptions.md +27 -0
- package/docs/interfaces/WaitForActionOptions.md +5 -5
- package/docs/type-aliases/BaseFetchActionOptions.md +1 -1
- package/docs/type-aliases/BaseFetchCollectorOptions.md +1 -1
- package/docs/type-aliases/BrowserEngine.md +1 -1
- package/docs/type-aliases/FetchActionCapabilities.md +1 -1
- package/docs/type-aliases/FetchActionCapabilityMode.md +1 -1
- package/docs/type-aliases/FetchActionOptions.md +1 -1
- package/docs/type-aliases/FetchEngineAction.md +2 -2
- package/docs/type-aliases/FetchEngineType.md +1 -1
- package/docs/type-aliases/FetchReturnType.md +1 -1
- package/docs/type-aliases/FetchReturnTypeFor.md +1 -1
- package/docs/type-aliases/OnFetchPauseCallback.md +1 -1
- package/docs/type-aliases/ResourceType.md +1 -1
- package/docs/type-aliases/TrimPreset.md +13 -0
- package/docs/variables/DefaultFetcherProperties.md +1 -1
- package/docs/variables/FetcherOptionKeys.md +1 -1
- package/docs/variables/TRIM_PRESETS.md +11 -0
- package/package.json +11 -11
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: PlaywrightFetchEngine
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:19](https://github.com/isdk/web-fetcher.js/blob/
|
|
9
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:19](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L19)
|
|
10
10
|
|
|
11
11
|
## Extends
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ Defined in: [packages/web-fetcher/src/engine/playwright.ts:19](https://github.co
|
|
|
32
32
|
|
|
33
33
|
> `protected` `optional` **\_initialCookies**: [`Cookie`](../interfaces/Cookie.md)[]
|
|
34
34
|
|
|
35
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
35
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:396](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L396)
|
|
36
36
|
|
|
37
37
|
#### Inherited from
|
|
38
38
|
|
|
@@ -44,7 +44,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:278](https://github.com/isd
|
|
|
44
44
|
|
|
45
45
|
> `protected` **\_initializedSessions**: `Set`\<`string`\>
|
|
46
46
|
|
|
47
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
47
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:397](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L397)
|
|
48
48
|
|
|
49
49
|
#### Inherited from
|
|
50
50
|
|
|
@@ -56,7 +56,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:279](https://github.com/isd
|
|
|
56
56
|
|
|
57
57
|
> `protected` **actionEmitter**: `EventEmitter`
|
|
58
58
|
|
|
59
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
59
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:401](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L401)
|
|
60
60
|
|
|
61
61
|
#### Inherited from
|
|
62
62
|
|
|
@@ -64,11 +64,35 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:283](https://github.com/isd
|
|
|
64
64
|
|
|
65
65
|
***
|
|
66
66
|
|
|
67
|
+
### actionQueue
|
|
68
|
+
|
|
69
|
+
> `protected` **actionQueue**: [`DispatchedEngineAction`](../interfaces/DispatchedEngineAction.md)[] = `[]`
|
|
70
|
+
|
|
71
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:408](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L408)
|
|
72
|
+
|
|
73
|
+
#### Inherited from
|
|
74
|
+
|
|
75
|
+
[`FetchEngine`](FetchEngine.md).[`actionQueue`](FetchEngine.md#actionqueue)
|
|
76
|
+
|
|
77
|
+
***
|
|
78
|
+
|
|
79
|
+
### activeContext?
|
|
80
|
+
|
|
81
|
+
> `protected` `optional` **activeContext**: `PlaywrightCrawlingContext`\<`Dictionary`\>
|
|
82
|
+
|
|
83
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:405](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L405)
|
|
84
|
+
|
|
85
|
+
#### Inherited from
|
|
86
|
+
|
|
87
|
+
[`FetchEngine`](FetchEngine.md).[`activeContext`](FetchEngine.md#activecontext)
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
67
91
|
### blockedTypes
|
|
68
92
|
|
|
69
93
|
> `protected` **blockedTypes**: `Set`\<`string`\>
|
|
70
94
|
|
|
71
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
95
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:410](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L410)
|
|
72
96
|
|
|
73
97
|
#### Inherited from
|
|
74
98
|
|
|
@@ -80,7 +104,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:288](https://github.com/isd
|
|
|
80
104
|
|
|
81
105
|
> `protected` `optional` **config**: `Configuration`
|
|
82
106
|
|
|
83
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
107
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:390](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L390)
|
|
84
108
|
|
|
85
109
|
#### Inherited from
|
|
86
110
|
|
|
@@ -92,7 +116,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:272](https://github.com/isd
|
|
|
92
116
|
|
|
93
117
|
> `protected` `optional` **crawler**: `PlaywrightCrawler`
|
|
94
118
|
|
|
95
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
119
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:387](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L387)
|
|
96
120
|
|
|
97
121
|
#### Inherited from
|
|
98
122
|
|
|
@@ -104,7 +128,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:269](https://github.com/isd
|
|
|
104
128
|
|
|
105
129
|
> `protected` `optional` **crawlerRunPromise**: `Promise`\<`FinalStatistics`\>
|
|
106
130
|
|
|
107
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
131
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:389](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L389)
|
|
108
132
|
|
|
109
133
|
#### Inherited from
|
|
110
134
|
|
|
@@ -116,7 +140,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:271](https://github.com/isd
|
|
|
116
140
|
|
|
117
141
|
> `protected` `optional` **ctx**: [`FetchEngineContext`](../interfaces/FetchEngineContext.md)
|
|
118
142
|
|
|
119
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
143
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:385](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L385)
|
|
120
144
|
|
|
121
145
|
#### Inherited from
|
|
122
146
|
|
|
@@ -124,11 +148,27 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:267](https://github.com/isd
|
|
|
124
148
|
|
|
125
149
|
***
|
|
126
150
|
|
|
151
|
+
### currentMousePos
|
|
152
|
+
|
|
153
|
+
> `protected` **currentMousePos**: `object`
|
|
154
|
+
|
|
155
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:427](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L427)
|
|
156
|
+
|
|
157
|
+
#### x
|
|
158
|
+
|
|
159
|
+
> **x**: `number` = `0`
|
|
160
|
+
|
|
161
|
+
#### y
|
|
162
|
+
|
|
163
|
+
> **y**: `number` = `0`
|
|
164
|
+
|
|
165
|
+
***
|
|
166
|
+
|
|
127
167
|
### currentSession?
|
|
128
168
|
|
|
129
169
|
> `protected` `optional` **currentSession**: `Session`
|
|
130
170
|
|
|
131
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
171
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:398](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L398)
|
|
132
172
|
|
|
133
173
|
#### Inherited from
|
|
134
174
|
|
|
@@ -140,7 +180,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:280](https://github.com/isd
|
|
|
140
180
|
|
|
141
181
|
> `protected` **hdrs**: `Record`\<`string`, `string`\> = `{}`
|
|
142
182
|
|
|
143
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
183
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:395](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L395)
|
|
144
184
|
|
|
145
185
|
#### Inherited from
|
|
146
186
|
|
|
@@ -152,7 +192,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:277](https://github.com/isd
|
|
|
152
192
|
|
|
153
193
|
> `protected` `optional` **isCrawlerReady**: `boolean`
|
|
154
194
|
|
|
155
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
195
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:388](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L388)
|
|
156
196
|
|
|
157
197
|
#### Inherited from
|
|
158
198
|
|
|
@@ -164,7 +204,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:270](https://github.com/isd
|
|
|
164
204
|
|
|
165
205
|
> `protected` **isEngineDisposed**: `boolean` = `false`
|
|
166
206
|
|
|
167
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
207
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:403](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L403)
|
|
168
208
|
|
|
169
209
|
#### Inherited from
|
|
170
210
|
|
|
@@ -172,11 +212,23 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:285](https://github.com/isd
|
|
|
172
212
|
|
|
173
213
|
***
|
|
174
214
|
|
|
215
|
+
### isExecutingAction
|
|
216
|
+
|
|
217
|
+
> `protected` **isExecutingAction**: `boolean` = `false`
|
|
218
|
+
|
|
219
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:406](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L406)
|
|
220
|
+
|
|
221
|
+
#### Inherited from
|
|
222
|
+
|
|
223
|
+
[`FetchEngine`](FetchEngine.md).[`isExecutingAction`](FetchEngine.md#isexecutingaction)
|
|
224
|
+
|
|
225
|
+
***
|
|
226
|
+
|
|
175
227
|
### isPageActive
|
|
176
228
|
|
|
177
229
|
> `protected` **isPageActive**: `boolean` = `false`
|
|
178
230
|
|
|
179
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
231
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:402](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L402)
|
|
180
232
|
|
|
181
233
|
#### Inherited from
|
|
182
234
|
|
|
@@ -184,11 +236,23 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:284](https://github.com/isd
|
|
|
184
236
|
|
|
185
237
|
***
|
|
186
238
|
|
|
239
|
+
### isProcessingActionLoop
|
|
240
|
+
|
|
241
|
+
> `protected` **isProcessingActionLoop**: `boolean` = `false`
|
|
242
|
+
|
|
243
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:409](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L409)
|
|
244
|
+
|
|
245
|
+
#### Inherited from
|
|
246
|
+
|
|
247
|
+
[`FetchEngine`](FetchEngine.md).[`isProcessingActionLoop`](FetchEngine.md#isprocessingactionloop)
|
|
248
|
+
|
|
249
|
+
***
|
|
250
|
+
|
|
187
251
|
### kvStore?
|
|
188
252
|
|
|
189
253
|
> `protected` `optional` **kvStore**: `KeyValueStore`
|
|
190
254
|
|
|
191
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
255
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:392](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L392)
|
|
192
256
|
|
|
193
257
|
#### Inherited from
|
|
194
258
|
|
|
@@ -200,7 +264,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:274](https://github.com/isd
|
|
|
200
264
|
|
|
201
265
|
> `protected` `optional` **lastResponse**: [`FetchResponse`](../interfaces/FetchResponse.md)
|
|
202
266
|
|
|
203
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
267
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:407](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L407)
|
|
204
268
|
|
|
205
269
|
#### Inherited from
|
|
206
270
|
|
|
@@ -212,7 +276,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:287](https://github.com/isd
|
|
|
212
276
|
|
|
213
277
|
> `protected` **navigationLock**: `PromiseLock`
|
|
214
278
|
|
|
215
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
279
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:404](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L404)
|
|
216
280
|
|
|
217
281
|
#### Inherited from
|
|
218
282
|
|
|
@@ -224,7 +288,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:286](https://github.com/isd
|
|
|
224
288
|
|
|
225
289
|
> `protected` `optional` **opts**: [`BaseFetcherProperties`](../interfaces/BaseFetcherProperties.md)
|
|
226
290
|
|
|
227
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
291
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:386](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L386)
|
|
228
292
|
|
|
229
293
|
#### Inherited from
|
|
230
294
|
|
|
@@ -236,7 +300,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:268](https://github.com/isd
|
|
|
236
300
|
|
|
237
301
|
> `protected` **pendingRequests**: `Map`\<`string`, [`PendingEngineRequest`](../interfaces/PendingEngineRequest.md)\>
|
|
238
302
|
|
|
239
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
303
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:399](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L399)
|
|
240
304
|
|
|
241
305
|
#### Inherited from
|
|
242
306
|
|
|
@@ -248,7 +312,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:281](https://github.com/isd
|
|
|
248
312
|
|
|
249
313
|
> `protected` `optional` **proxyConfiguration**: `ProxyConfiguration`
|
|
250
314
|
|
|
251
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
315
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:393](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L393)
|
|
252
316
|
|
|
253
317
|
#### Inherited from
|
|
254
318
|
|
|
@@ -260,7 +324,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:275](https://github.com/isd
|
|
|
260
324
|
|
|
261
325
|
> `protected` **requestCounter**: `number` = `0`
|
|
262
326
|
|
|
263
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
327
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:400](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L400)
|
|
264
328
|
|
|
265
329
|
#### Inherited from
|
|
266
330
|
|
|
@@ -272,7 +336,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:282](https://github.com/isd
|
|
|
272
336
|
|
|
273
337
|
> `protected` `optional` **requestQueue**: `RequestQueue`
|
|
274
338
|
|
|
275
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
339
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:391](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L391)
|
|
276
340
|
|
|
277
341
|
#### Inherited from
|
|
278
342
|
|
|
@@ -284,7 +348,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:273](https://github.com/isd
|
|
|
284
348
|
|
|
285
349
|
> `readonly` `static` **id**: `"playwright"` = `'playwright'`
|
|
286
350
|
|
|
287
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:24](https://github.com/isdk/web-fetcher.js/blob/
|
|
351
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:24](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L24)
|
|
288
352
|
|
|
289
353
|
Unique identifier for the engine implementation.
|
|
290
354
|
|
|
@@ -302,7 +366,7 @@ Must be defined by concrete implementations. Used for registration and lookup in
|
|
|
302
366
|
|
|
303
367
|
> `readonly` `static` **mode**: `"browser"` = `'browser'`
|
|
304
368
|
|
|
305
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:25](https://github.com/isdk/web-fetcher.js/blob/
|
|
369
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:25](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L25)
|
|
306
370
|
|
|
307
371
|
Execution mode of the engine (`'http'` or `'browser'`).
|
|
308
372
|
|
|
@@ -320,15 +384,15 @@ Must be defined by concrete implementations. Indicates whether engine operates a
|
|
|
320
384
|
|
|
321
385
|
#### Get Signature
|
|
322
386
|
|
|
323
|
-
> **get** **context**():
|
|
387
|
+
> **get** **context**(): [`FetchEngineContext`](../interfaces/FetchEngineContext.md) \| `undefined`
|
|
324
388
|
|
|
325
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
389
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:919](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L919)
|
|
326
390
|
|
|
327
391
|
Gets the fetch engine context associated with this instance.
|
|
328
392
|
|
|
329
393
|
##### Returns
|
|
330
394
|
|
|
331
|
-
|
|
395
|
+
[`FetchEngineContext`](../interfaces/FetchEngineContext.md) \| `undefined`
|
|
332
396
|
|
|
333
397
|
#### Inherited from
|
|
334
398
|
|
|
@@ -342,7 +406,7 @@ Gets the fetch engine context associated with this instance.
|
|
|
342
406
|
|
|
343
407
|
> **get** **id**(): `string`
|
|
344
408
|
|
|
345
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
409
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:894](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L894)
|
|
346
410
|
|
|
347
411
|
Gets the unique identifier of this engine implementation.
|
|
348
412
|
|
|
@@ -362,7 +426,7 @@ Gets the unique identifier of this engine implementation.
|
|
|
362
426
|
|
|
363
427
|
> **get** **mode**(): [`FetchEngineType`](../type-aliases/FetchEngineType.md)
|
|
364
428
|
|
|
365
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
429
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:912](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L912)
|
|
366
430
|
|
|
367
431
|
Gets the execution mode of this engine (`'http'` or `'browser'`).
|
|
368
432
|
|
|
@@ -380,7 +444,7 @@ Gets the execution mode of this engine (`'http'` or `'browser'`).
|
|
|
380
444
|
|
|
381
445
|
> `protected` **\_buildResponse**(`context`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\>
|
|
382
446
|
|
|
383
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:27](https://github.com/isdk/web-fetcher.js/blob/
|
|
447
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:27](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L27)
|
|
384
448
|
|
|
385
449
|
**`Internal`**
|
|
386
450
|
|
|
@@ -414,7 +478,7 @@ Converts implementation-specific context (Playwright `page` or Cheerio `$`) to s
|
|
|
414
478
|
|
|
415
479
|
> `protected` `optional` **\_cleanup**(): `Promise`\<`void`\>
|
|
416
480
|
|
|
417
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
481
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:420](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L420)
|
|
418
482
|
|
|
419
483
|
#### Returns
|
|
420
484
|
|
|
@@ -430,7 +494,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:290](https://github.com/isd
|
|
|
430
494
|
|
|
431
495
|
> `protected` **\_commonCleanup**(): `Promise`\<`void`\>
|
|
432
496
|
|
|
433
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
497
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1321](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1321)
|
|
434
498
|
|
|
435
499
|
#### Returns
|
|
436
500
|
|
|
@@ -442,11 +506,51 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:1239](https://github.com/is
|
|
|
442
506
|
|
|
443
507
|
***
|
|
444
508
|
|
|
509
|
+
### \_contains()
|
|
510
|
+
|
|
511
|
+
> **\_contains**(`container`, `element`): `Promise`\<`boolean`\>
|
|
512
|
+
|
|
513
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:199](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L199)
|
|
514
|
+
|
|
515
|
+
**`Internal`**
|
|
516
|
+
|
|
517
|
+
Checks if the `container` scope contains the `element` scope.
|
|
518
|
+
|
|
519
|
+
#### Parameters
|
|
520
|
+
|
|
521
|
+
##### container
|
|
522
|
+
|
|
523
|
+
`Locator`
|
|
524
|
+
|
|
525
|
+
The potential ancestor element.
|
|
526
|
+
|
|
527
|
+
##### element
|
|
528
|
+
|
|
529
|
+
`Locator`
|
|
530
|
+
|
|
531
|
+
The potential descendant element.
|
|
532
|
+
|
|
533
|
+
#### Returns
|
|
534
|
+
|
|
535
|
+
`Promise`\<`boolean`\>
|
|
536
|
+
|
|
537
|
+
A promise resolving to `true` if `container` contains `element`.
|
|
538
|
+
|
|
539
|
+
#### See
|
|
540
|
+
|
|
541
|
+
IExtractEngine.\_contains for implementation details.
|
|
542
|
+
|
|
543
|
+
#### Overrides
|
|
544
|
+
|
|
545
|
+
[`FetchEngine`](FetchEngine.md).[`_contains`](FetchEngine.md#_contains)
|
|
546
|
+
|
|
547
|
+
***
|
|
548
|
+
|
|
445
549
|
### \_createCrawler()
|
|
446
550
|
|
|
447
551
|
> `protected` **\_createCrawler**(`options`, `config?`): `PlaywrightCrawler`
|
|
448
552
|
|
|
449
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:
|
|
553
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:796](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L796)
|
|
450
554
|
|
|
451
555
|
**`Internal`**
|
|
452
556
|
|
|
@@ -478,7 +582,7 @@ The final crawler options.
|
|
|
478
582
|
|
|
479
583
|
> `protected` **\_executePendingActions**(`context`): `Promise`\<`void`\>
|
|
480
584
|
|
|
481
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
585
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1162](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1162)
|
|
482
586
|
|
|
483
587
|
**`Internal`**
|
|
484
588
|
|
|
@@ -529,9 +633,9 @@ If called outside valid page context window (`!this.isPageActive`)
|
|
|
529
633
|
|
|
530
634
|
### \_extract()
|
|
531
635
|
|
|
532
|
-
> `protected` **\_extract**(`schema`, `
|
|
636
|
+
> `protected` **\_extract**(`schema`, `scope`, `parentStrict?`): `Promise`\<`any`\>
|
|
533
637
|
|
|
534
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
638
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:563](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L563)
|
|
535
639
|
|
|
536
640
|
#### Parameters
|
|
537
641
|
|
|
@@ -539,10 +643,14 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:365](https://github.com/isd
|
|
|
539
643
|
|
|
540
644
|
`ExtractSchema`
|
|
541
645
|
|
|
542
|
-
#####
|
|
646
|
+
##### scope
|
|
543
647
|
|
|
544
648
|
`any`
|
|
545
649
|
|
|
650
|
+
##### parentStrict?
|
|
651
|
+
|
|
652
|
+
`boolean`
|
|
653
|
+
|
|
546
654
|
#### Returns
|
|
547
655
|
|
|
548
656
|
`Promise`\<`any`\>
|
|
@@ -555,9 +663,9 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:365](https://github.com/isd
|
|
|
555
663
|
|
|
556
664
|
### \_extractColumnar()
|
|
557
665
|
|
|
558
|
-
> `protected` **\_extractColumnar**(`schema`, `container`, `opts?`): `Promise`\<`
|
|
666
|
+
> `protected` **\_extractColumnar**(`schema`, `container`, `opts?`): `Promise`\<`any`[] \| `null`\>
|
|
559
667
|
|
|
560
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
668
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:605](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L605)
|
|
561
669
|
|
|
562
670
|
**`Internal`**
|
|
563
671
|
|
|
@@ -585,7 +693,7 @@ Columnar extraction options (strict, inference).
|
|
|
585
693
|
|
|
586
694
|
#### Returns
|
|
587
695
|
|
|
588
|
-
`Promise`\<`
|
|
696
|
+
`Promise`\<`any`[] \| `null`\>
|
|
589
697
|
|
|
590
698
|
An array of extracted items, or null if requirements aren't met.
|
|
591
699
|
|
|
@@ -597,9 +705,9 @@ An array of extracted items, or null if requirements aren't met.
|
|
|
597
705
|
|
|
598
706
|
### \_extractNested()
|
|
599
707
|
|
|
600
|
-
> `protected` **\_extractNested**(`items`, `elements`): `Promise`\<`any`[]\>
|
|
708
|
+
> `protected` **\_extractNested**(`items`, `elements`, `opts?`): `Promise`\<`any`[]\>
|
|
601
709
|
|
|
602
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
710
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:588](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L588)
|
|
603
711
|
|
|
604
712
|
**`Internal`**
|
|
605
713
|
|
|
@@ -619,6 +727,12 @@ The schema for each item.
|
|
|
619
727
|
|
|
620
728
|
The list of item elements.
|
|
621
729
|
|
|
730
|
+
##### opts?
|
|
731
|
+
|
|
732
|
+
###### strict?
|
|
733
|
+
|
|
734
|
+
`boolean`
|
|
735
|
+
|
|
622
736
|
#### Returns
|
|
623
737
|
|
|
624
738
|
`Promise`\<`any`[]\>
|
|
@@ -631,9 +745,9 @@ The list of item elements.
|
|
|
631
745
|
|
|
632
746
|
### \_extractSegmented()
|
|
633
747
|
|
|
634
|
-
> `protected` **\_extractSegmented**(`schema`, `container`, `opts?`): `Promise`\<`
|
|
748
|
+
> `protected` **\_extractSegmented**(`schema`, `container`, `opts?`): `Promise`\<`any`[] \| `null`\>
|
|
635
749
|
|
|
636
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
750
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:622](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L622)
|
|
637
751
|
|
|
638
752
|
**`Internal`**
|
|
639
753
|
|
|
@@ -661,7 +775,7 @@ Segmented extraction options (anchor).
|
|
|
661
775
|
|
|
662
776
|
#### Returns
|
|
663
777
|
|
|
664
|
-
`Promise`\<`
|
|
778
|
+
`Promise`\<`any`[] \| `null`\>
|
|
665
779
|
|
|
666
780
|
An array of extracted items.
|
|
667
781
|
|
|
@@ -673,9 +787,9 @@ An array of extracted items.
|
|
|
673
787
|
|
|
674
788
|
### \_extractValue()
|
|
675
789
|
|
|
676
|
-
>
|
|
790
|
+
> **\_extractValue**(`schema`, `scope`): `Promise`\<`any`\>
|
|
677
791
|
|
|
678
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:
|
|
792
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:352](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L352)
|
|
679
793
|
|
|
680
794
|
**`Internal`**
|
|
681
795
|
|
|
@@ -689,27 +803,195 @@ Extracts a primitive value from the element based on schema.
|
|
|
689
803
|
|
|
690
804
|
Value extraction schema.
|
|
691
805
|
|
|
692
|
-
#####
|
|
806
|
+
##### scope
|
|
693
807
|
|
|
694
808
|
`Locator`
|
|
695
809
|
|
|
696
|
-
The element
|
|
810
|
+
The element scope.
|
|
697
811
|
|
|
698
812
|
#### Returns
|
|
699
813
|
|
|
700
814
|
`Promise`\<`any`\>
|
|
701
815
|
|
|
816
|
+
Extracted value.
|
|
817
|
+
|
|
818
|
+
#### See
|
|
819
|
+
|
|
820
|
+
IExtractEngine.\_extractValue for behavior contract.
|
|
821
|
+
|
|
702
822
|
#### Overrides
|
|
703
823
|
|
|
704
824
|
[`FetchEngine`](FetchEngine.md).[`_extractValue`](FetchEngine.md#_extractvalue)
|
|
705
825
|
|
|
706
826
|
***
|
|
707
827
|
|
|
828
|
+
### \_findClosestAncestor()
|
|
829
|
+
|
|
830
|
+
> **\_findClosestAncestor**(`scope`, `candidates`): `Promise`\<`any`\>
|
|
831
|
+
|
|
832
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:163](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L163)
|
|
833
|
+
|
|
834
|
+
**`Internal`**
|
|
835
|
+
|
|
836
|
+
Finds the closest ancestor of `scope` (including itself) that exists in the `candidates` array.
|
|
837
|
+
|
|
838
|
+
#### Parameters
|
|
839
|
+
|
|
840
|
+
##### scope
|
|
841
|
+
|
|
842
|
+
`Locator`
|
|
843
|
+
|
|
844
|
+
The starting element.
|
|
845
|
+
|
|
846
|
+
##### candidates
|
|
847
|
+
|
|
848
|
+
`Locator`[]
|
|
849
|
+
|
|
850
|
+
The array of potential ancestor scopes.
|
|
851
|
+
|
|
852
|
+
#### Returns
|
|
853
|
+
|
|
854
|
+
`Promise`\<`any`\>
|
|
855
|
+
|
|
856
|
+
A promise resolving to the matching candidate scope, or `null` if none found.
|
|
857
|
+
|
|
858
|
+
#### See
|
|
859
|
+
|
|
860
|
+
IExtractEngine.\_findClosestAncestor for implementation details.
|
|
861
|
+
|
|
862
|
+
#### Overrides
|
|
863
|
+
|
|
864
|
+
[`FetchEngine`](FetchEngine.md).[`_findClosestAncestor`](FetchEngine.md#_findclosestancestor)
|
|
865
|
+
|
|
866
|
+
***
|
|
867
|
+
|
|
868
|
+
### \_findCommonAncestor()
|
|
869
|
+
|
|
870
|
+
> **\_findCommonAncestor**(`scope1`, `scope2`): `Promise`\<`any`\>
|
|
871
|
+
|
|
872
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:211](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L211)
|
|
873
|
+
|
|
874
|
+
**`Internal`**
|
|
875
|
+
|
|
876
|
+
Finds the Lowest Common Ancestor (LCA) of two element scopes.
|
|
877
|
+
|
|
878
|
+
#### Parameters
|
|
879
|
+
|
|
880
|
+
##### scope1
|
|
881
|
+
|
|
882
|
+
`Locator`
|
|
883
|
+
|
|
884
|
+
The first element scope.
|
|
885
|
+
|
|
886
|
+
##### scope2
|
|
887
|
+
|
|
888
|
+
`Locator`
|
|
889
|
+
|
|
890
|
+
The second element scope.
|
|
891
|
+
|
|
892
|
+
#### Returns
|
|
893
|
+
|
|
894
|
+
`Promise`\<`any`\>
|
|
895
|
+
|
|
896
|
+
A promise resolving to the LCA element scope, or `null` if none found.
|
|
897
|
+
|
|
898
|
+
#### Overrides
|
|
899
|
+
|
|
900
|
+
[`FetchEngine`](FetchEngine.md).[`_findCommonAncestor`](FetchEngine.md#_findcommonancestor)
|
|
901
|
+
|
|
902
|
+
***
|
|
903
|
+
|
|
904
|
+
### \_findContainerChild()
|
|
905
|
+
|
|
906
|
+
> **\_findContainerChild**(`element`, `container`): `Promise`\<`any`\>
|
|
907
|
+
|
|
908
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:284](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L284)
|
|
909
|
+
|
|
910
|
+
**`Internal`**
|
|
911
|
+
|
|
912
|
+
Finds the direct child of container that contains element.
|
|
913
|
+
|
|
914
|
+
#### Parameters
|
|
915
|
+
|
|
916
|
+
##### element
|
|
917
|
+
|
|
918
|
+
`Locator`
|
|
919
|
+
|
|
920
|
+
The descendant element.
|
|
921
|
+
|
|
922
|
+
##### container
|
|
923
|
+
|
|
924
|
+
`Locator`
|
|
925
|
+
|
|
926
|
+
The container element.
|
|
927
|
+
|
|
928
|
+
#### Returns
|
|
929
|
+
|
|
930
|
+
`Promise`\<`any`\>
|
|
931
|
+
|
|
932
|
+
The child element of container, or null.
|
|
933
|
+
|
|
934
|
+
#### Overrides
|
|
935
|
+
|
|
936
|
+
[`FetchEngine`](FetchEngine.md).[`_findContainerChild`](FetchEngine.md#_findcontainerchild)
|
|
937
|
+
|
|
938
|
+
***
|
|
939
|
+
|
|
940
|
+
### \_getInitialElementScope()
|
|
941
|
+
|
|
942
|
+
> `protected` **\_getInitialElementScope**(`context`): `any`
|
|
943
|
+
|
|
944
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:396](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L396)
|
|
945
|
+
|
|
946
|
+
**`Internal`**
|
|
947
|
+
|
|
948
|
+
Gets the initial scope for extraction for the specific engine.
|
|
949
|
+
|
|
950
|
+
#### Parameters
|
|
951
|
+
|
|
952
|
+
##### context
|
|
953
|
+
|
|
954
|
+
`PlaywrightCrawlingContext`
|
|
955
|
+
|
|
956
|
+
Crawlee crawling context
|
|
957
|
+
|
|
958
|
+
#### Returns
|
|
959
|
+
|
|
960
|
+
`any`
|
|
961
|
+
|
|
962
|
+
#### Overrides
|
|
963
|
+
|
|
964
|
+
[`FetchEngine`](FetchEngine.md).[`_getInitialElementScope`](FetchEngine.md#_getinitialelementscope)
|
|
965
|
+
|
|
966
|
+
***
|
|
967
|
+
|
|
968
|
+
### \_getRandomDelay()
|
|
969
|
+
|
|
970
|
+
> `protected` **\_getRandomDelay**(`base`, `variance`): `number`
|
|
971
|
+
|
|
972
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:429](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L429)
|
|
973
|
+
|
|
974
|
+
#### Parameters
|
|
975
|
+
|
|
976
|
+
##### base
|
|
977
|
+
|
|
978
|
+
`number`
|
|
979
|
+
|
|
980
|
+
##### variance
|
|
981
|
+
|
|
982
|
+
`number` = `0.3`
|
|
983
|
+
|
|
984
|
+
#### Returns
|
|
985
|
+
|
|
986
|
+
`number`
|
|
987
|
+
|
|
988
|
+
***
|
|
989
|
+
|
|
708
990
|
### \_getSpecificCrawlerOptions()
|
|
709
991
|
|
|
710
992
|
> `protected` **\_getSpecificCrawlerOptions**(`ctx`): `Promise`\<`Partial`\<`PlaywrightCrawlerOptions`\>\>
|
|
711
993
|
|
|
712
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:
|
|
994
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:803](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L803)
|
|
713
995
|
|
|
714
996
|
**`Internal`**
|
|
715
997
|
|
|
@@ -733,63 +1015,201 @@ The fetch engine context.
|
|
|
733
1015
|
|
|
734
1016
|
***
|
|
735
1017
|
|
|
736
|
-
### \
|
|
1018
|
+
### \_getTrajectory()
|
|
737
1019
|
|
|
738
|
-
> `protected` **\
|
|
1020
|
+
> `protected` **\_getTrajectory**(`start`, `end`, `steps`): `object`[]
|
|
739
1021
|
|
|
740
|
-
Defined in: [packages/web-fetcher/src/engine/
|
|
1022
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:435](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L435)
|
|
741
1023
|
|
|
742
1024
|
#### Parameters
|
|
743
1025
|
|
|
744
|
-
#####
|
|
1026
|
+
##### start
|
|
745
1027
|
|
|
746
|
-
|
|
1028
|
+
###### x
|
|
1029
|
+
|
|
1030
|
+
`number`
|
|
1031
|
+
|
|
1032
|
+
###### y
|
|
1033
|
+
|
|
1034
|
+
`number`
|
|
1035
|
+
|
|
1036
|
+
##### end
|
|
1037
|
+
|
|
1038
|
+
###### x
|
|
1039
|
+
|
|
1040
|
+
`number`
|
|
1041
|
+
|
|
1042
|
+
###### y
|
|
1043
|
+
|
|
1044
|
+
`number`
|
|
1045
|
+
|
|
1046
|
+
##### steps
|
|
1047
|
+
|
|
1048
|
+
`number` = `-1`
|
|
747
1049
|
|
|
748
1050
|
#### Returns
|
|
749
1051
|
|
|
750
|
-
`
|
|
1052
|
+
`object`[]
|
|
1053
|
+
|
|
1054
|
+
***
|
|
1055
|
+
|
|
1056
|
+
### \_getTrimInfo()
|
|
1057
|
+
|
|
1058
|
+
> `protected` **\_getTrimInfo**(`options`): `object`
|
|
1059
|
+
|
|
1060
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:422](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L422)
|
|
1061
|
+
|
|
1062
|
+
#### Parameters
|
|
1063
|
+
|
|
1064
|
+
##### options
|
|
1065
|
+
|
|
1066
|
+
[`TrimActionOptions`](../interfaces/TrimActionOptions.md)
|
|
1067
|
+
|
|
1068
|
+
#### Returns
|
|
1069
|
+
|
|
1070
|
+
`object`
|
|
1071
|
+
|
|
1072
|
+
##### removeComments
|
|
1073
|
+
|
|
1074
|
+
> **removeComments**: `boolean`
|
|
1075
|
+
|
|
1076
|
+
##### removeHidden
|
|
1077
|
+
|
|
1078
|
+
> **removeHidden**: `boolean`
|
|
1079
|
+
|
|
1080
|
+
##### selectors
|
|
1081
|
+
|
|
1082
|
+
> **selectors**: `string`[] = `allSelectors`
|
|
751
1083
|
|
|
752
1084
|
#### Inherited from
|
|
753
1085
|
|
|
754
|
-
[`FetchEngine`](FetchEngine.md).[`
|
|
1086
|
+
[`FetchEngine`](FetchEngine.md).[`_getTrimInfo`](FetchEngine.md#_gettriminfo)
|
|
1087
|
+
|
|
1088
|
+
***
|
|
1089
|
+
|
|
1090
|
+
### \_handlePause()
|
|
1091
|
+
|
|
1092
|
+
> `protected` **\_handlePause**(`action`): `Promise`\<`void`\>
|
|
1093
|
+
|
|
1094
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1122](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1122)
|
|
1095
|
+
|
|
1096
|
+
#### Parameters
|
|
1097
|
+
|
|
1098
|
+
##### action
|
|
1099
|
+
|
|
1100
|
+
###### message?
|
|
1101
|
+
|
|
1102
|
+
`string`
|
|
1103
|
+
|
|
1104
|
+
#### Returns
|
|
1105
|
+
|
|
1106
|
+
`Promise`\<`void`\>
|
|
1107
|
+
|
|
1108
|
+
#### Inherited from
|
|
1109
|
+
|
|
1110
|
+
[`FetchEngine`](FetchEngine.md).[`_handlePause`](FetchEngine.md#_handlepause)
|
|
755
1111
|
|
|
756
1112
|
***
|
|
757
1113
|
|
|
758
1114
|
### \_isSameElement()
|
|
759
1115
|
|
|
760
|
-
>
|
|
1116
|
+
> **\_isSameElement**(`scope1`, `scope2`): `Promise`\<`boolean`\>
|
|
761
1117
|
|
|
762
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:
|
|
1118
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:150](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L150)
|
|
763
1119
|
|
|
764
1120
|
**`Internal`**
|
|
765
1121
|
|
|
766
|
-
Checks if two elements are the same.
|
|
1122
|
+
Checks if two elements are the same identity.
|
|
767
1123
|
|
|
768
1124
|
#### Parameters
|
|
769
1125
|
|
|
770
|
-
#####
|
|
1126
|
+
##### scope1
|
|
771
1127
|
|
|
772
1128
|
`Locator`
|
|
773
1129
|
|
|
774
|
-
|
|
1130
|
+
First element scope.
|
|
1131
|
+
|
|
1132
|
+
##### scope2
|
|
775
1133
|
|
|
776
1134
|
`Locator`
|
|
777
1135
|
|
|
1136
|
+
Second element scope.
|
|
1137
|
+
|
|
778
1138
|
#### Returns
|
|
779
1139
|
|
|
780
1140
|
`Promise`\<`boolean`\>
|
|
781
1141
|
|
|
1142
|
+
True if they are the same DOM node.
|
|
1143
|
+
|
|
782
1144
|
#### Overrides
|
|
783
1145
|
|
|
784
1146
|
[`FetchEngine`](FetchEngine.md).[`_isSameElement`](FetchEngine.md#_issameelement)
|
|
785
1147
|
|
|
786
1148
|
***
|
|
787
1149
|
|
|
1150
|
+
### \_logDebug()
|
|
1151
|
+
|
|
1152
|
+
> **\_logDebug**(`category`, ...`args`): `void`
|
|
1153
|
+
|
|
1154
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:412](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L412)
|
|
1155
|
+
|
|
1156
|
+
Logs debug information if debug mode is enabled.
|
|
1157
|
+
|
|
1158
|
+
#### Parameters
|
|
1159
|
+
|
|
1160
|
+
##### category
|
|
1161
|
+
|
|
1162
|
+
`string`
|
|
1163
|
+
|
|
1164
|
+
The category of the log message.
|
|
1165
|
+
|
|
1166
|
+
##### args
|
|
1167
|
+
|
|
1168
|
+
...`any`[]
|
|
1169
|
+
|
|
1170
|
+
Arguments to log.
|
|
1171
|
+
|
|
1172
|
+
#### Returns
|
|
1173
|
+
|
|
1174
|
+
`void`
|
|
1175
|
+
|
|
1176
|
+
#### Inherited from
|
|
1177
|
+
|
|
1178
|
+
[`FetchEngine`](FetchEngine.md).[`_logDebug`](FetchEngine.md#_logdebug)
|
|
1179
|
+
|
|
1180
|
+
***
|
|
1181
|
+
|
|
1182
|
+
### \_moveToSelector()
|
|
1183
|
+
|
|
1184
|
+
> `protected` **\_moveToSelector**(`context`, `selector`, `steps`): `Promise`\<\{ `x`: `number`; `y`: `number`; \}\>
|
|
1185
|
+
|
|
1186
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:484](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L484)
|
|
1187
|
+
|
|
1188
|
+
#### Parameters
|
|
1189
|
+
|
|
1190
|
+
##### context
|
|
1191
|
+
|
|
1192
|
+
`PlaywrightCrawlingContext`
|
|
1193
|
+
|
|
1194
|
+
##### selector
|
|
1195
|
+
|
|
1196
|
+
`string`
|
|
1197
|
+
|
|
1198
|
+
##### steps
|
|
1199
|
+
|
|
1200
|
+
`number` = `-1`
|
|
1201
|
+
|
|
1202
|
+
#### Returns
|
|
1203
|
+
|
|
1204
|
+
`Promise`\<\{ `x`: `number`; `y`: `number`; \}\>
|
|
1205
|
+
|
|
1206
|
+
***
|
|
1207
|
+
|
|
788
1208
|
### \_nextSiblingsUntil()
|
|
789
1209
|
|
|
790
|
-
>
|
|
1210
|
+
> **\_nextSiblingsUntil**(`scope`, `untilSelector?`): `Promise`\<`any`[]\>
|
|
791
1211
|
|
|
792
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:
|
|
1212
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:127](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L127)
|
|
793
1213
|
|
|
794
1214
|
**`Internal`**
|
|
795
1215
|
|
|
@@ -798,20 +1218,24 @@ Used in 'segmented' extraction mode.
|
|
|
798
1218
|
|
|
799
1219
|
#### Parameters
|
|
800
1220
|
|
|
801
|
-
#####
|
|
1221
|
+
##### scope
|
|
802
1222
|
|
|
803
1223
|
`Locator`
|
|
804
1224
|
|
|
1225
|
+
The anchor element scope.
|
|
1226
|
+
|
|
805
1227
|
##### untilSelector?
|
|
806
1228
|
|
|
807
1229
|
`string`
|
|
808
1230
|
|
|
809
|
-
Optional selector that marks the end of the segment.
|
|
1231
|
+
Optional selector that marks the end of the segment (exclusive).
|
|
810
1232
|
|
|
811
1233
|
#### Returns
|
|
812
1234
|
|
|
813
1235
|
`Promise`\<`any`[]\>
|
|
814
1236
|
|
|
1237
|
+
List of sibling elements between anchor and untilSelector.
|
|
1238
|
+
|
|
815
1239
|
#### Overrides
|
|
816
1240
|
|
|
817
1241
|
[`FetchEngine`](FetchEngine.md).[`_nextSiblingsUntil`](FetchEngine.md#_nextsiblingsuntil)
|
|
@@ -822,7 +1246,7 @@ Optional selector that marks the end of the segment.
|
|
|
822
1246
|
|
|
823
1247
|
> `protected` **\_normalizeArrayMode**(`mode?`): `any`
|
|
824
1248
|
|
|
825
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1249
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:576](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L576)
|
|
826
1250
|
|
|
827
1251
|
**`Internal`**
|
|
828
1252
|
|
|
@@ -846,69 +1270,85 @@ The mode string or options object.
|
|
|
846
1270
|
|
|
847
1271
|
***
|
|
848
1272
|
|
|
849
|
-
### \
|
|
1273
|
+
### \_parentElement()
|
|
1274
|
+
|
|
1275
|
+
> **\_parentElement**(`scope`): `Promise`\<`any`\>
|
|
1276
|
+
|
|
1277
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:144](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L144)
|
|
850
1278
|
|
|
851
|
-
|
|
1279
|
+
**`Internal`**
|
|
852
1280
|
|
|
853
|
-
|
|
1281
|
+
Gets the parent element of the given element.
|
|
854
1282
|
|
|
855
1283
|
#### Parameters
|
|
856
1284
|
|
|
857
|
-
#####
|
|
1285
|
+
##### scope
|
|
858
1286
|
|
|
859
|
-
`
|
|
1287
|
+
`Locator`
|
|
1288
|
+
|
|
1289
|
+
The element scope.
|
|
860
1290
|
|
|
861
1291
|
#### Returns
|
|
862
1292
|
|
|
863
|
-
`
|
|
1293
|
+
`Promise`\<`any`\>
|
|
864
1294
|
|
|
865
|
-
|
|
1295
|
+
Parent element or null.
|
|
1296
|
+
|
|
1297
|
+
#### Overrides
|
|
866
1298
|
|
|
867
|
-
[`FetchEngine`](FetchEngine.md).[`
|
|
1299
|
+
[`FetchEngine`](FetchEngine.md).[`_parentElement`](FetchEngine.md#_parentelement)
|
|
868
1300
|
|
|
869
1301
|
***
|
|
870
1302
|
|
|
871
|
-
### \
|
|
1303
|
+
### \_processAction()
|
|
872
1304
|
|
|
873
|
-
> `protected` **\
|
|
1305
|
+
> `protected` **\_processAction**(`context`, `action`): `Promise`\<`any`\>
|
|
874
1306
|
|
|
875
|
-
Defined in: [packages/web-fetcher/src/engine/
|
|
1307
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1093](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1093)
|
|
876
1308
|
|
|
877
1309
|
**`Internal`**
|
|
878
1310
|
|
|
879
|
-
|
|
1311
|
+
Unified action processor that handles engine-agnostic actions.
|
|
880
1312
|
|
|
881
1313
|
#### Parameters
|
|
882
1314
|
|
|
883
1315
|
##### context
|
|
884
1316
|
|
|
885
|
-
`
|
|
1317
|
+
`PlaywrightCrawlingContext`
|
|
1318
|
+
|
|
1319
|
+
Crawlee crawling context
|
|
1320
|
+
|
|
1321
|
+
##### action
|
|
1322
|
+
|
|
1323
|
+
[`FetchEngineAction`](../type-aliases/FetchEngineAction.md)
|
|
1324
|
+
|
|
1325
|
+
Action to execute
|
|
886
1326
|
|
|
887
1327
|
#### Returns
|
|
888
1328
|
|
|
889
1329
|
`Promise`\<`any`\>
|
|
890
1330
|
|
|
891
|
-
####
|
|
1331
|
+
#### Inherited from
|
|
892
1332
|
|
|
893
|
-
[`FetchEngine`](FetchEngine.md).[`
|
|
1333
|
+
[`FetchEngine`](FetchEngine.md).[`_processAction`](FetchEngine.md#_processaction)
|
|
894
1334
|
|
|
895
1335
|
***
|
|
896
1336
|
|
|
897
1337
|
### \_querySelectorAll()
|
|
898
1338
|
|
|
899
|
-
>
|
|
1339
|
+
> **\_querySelectorAll**(`scope`, `selector`): `Promise`\<`any`[]\>
|
|
900
1340
|
|
|
901
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:87](https://github.com/isdk/web-fetcher.js/blob/
|
|
1341
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:87](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L87)
|
|
902
1342
|
|
|
903
1343
|
**`Internal`**
|
|
904
1344
|
|
|
905
|
-
Finds all elements matching the selector within the given
|
|
1345
|
+
Finds all elements matching the selector within the given scope.
|
|
906
1346
|
|
|
907
1347
|
#### Parameters
|
|
908
1348
|
|
|
909
|
-
#####
|
|
1349
|
+
##### scope
|
|
910
1350
|
|
|
911
|
-
The
|
|
1351
|
+
The scope to search in (Engine-specific element/node or array of nodes).
|
|
912
1352
|
|
|
913
1353
|
`Locator` | `Locator`[]
|
|
914
1354
|
|
|
@@ -922,6 +1362,12 @@ CSS selector.
|
|
|
922
1362
|
|
|
923
1363
|
`Promise`\<`any`[]\>
|
|
924
1364
|
|
|
1365
|
+
List of matching elements.
|
|
1366
|
+
|
|
1367
|
+
#### See
|
|
1368
|
+
|
|
1369
|
+
IExtractEngine.\_querySelectorAll for behavior contract.
|
|
1370
|
+
|
|
925
1371
|
#### Overrides
|
|
926
1372
|
|
|
927
1373
|
[`FetchEngine`](FetchEngine.md).[`_querySelectorAll`](FetchEngine.md#_queryselectorall)
|
|
@@ -932,7 +1378,7 @@ CSS selector.
|
|
|
932
1378
|
|
|
933
1379
|
> `protected` **\_sharedFailedRequestHandler**(`context`, `error?`): `Promise`\<`void`\>
|
|
934
1380
|
|
|
935
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1381
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1269](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1269)
|
|
936
1382
|
|
|
937
1383
|
#### Parameters
|
|
938
1384
|
|
|
@@ -958,7 +1404,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:1196](https://github.com/is
|
|
|
958
1404
|
|
|
959
1405
|
> `protected` **\_sharedRequestHandler**(`context`): `Promise`\<`void`\>
|
|
960
1406
|
|
|
961
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1407
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1228](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1228)
|
|
962
1408
|
|
|
963
1409
|
#### Parameters
|
|
964
1410
|
|
|
@@ -976,11 +1422,37 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:1156](https://github.com/is
|
|
|
976
1422
|
|
|
977
1423
|
***
|
|
978
1424
|
|
|
1425
|
+
### \_waitForNavigation()
|
|
1426
|
+
|
|
1427
|
+
> `protected` **\_waitForNavigation**(`context`, `oldUrl`, `actionType`): `Promise`\<`void`\>
|
|
1428
|
+
|
|
1429
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:404](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L404)
|
|
1430
|
+
|
|
1431
|
+
#### Parameters
|
|
1432
|
+
|
|
1433
|
+
##### context
|
|
1434
|
+
|
|
1435
|
+
`PlaywrightCrawlingContext`
|
|
1436
|
+
|
|
1437
|
+
##### oldUrl
|
|
1438
|
+
|
|
1439
|
+
`string`
|
|
1440
|
+
|
|
1441
|
+
##### actionType
|
|
1442
|
+
|
|
1443
|
+
`string`
|
|
1444
|
+
|
|
1445
|
+
#### Returns
|
|
1446
|
+
|
|
1447
|
+
`Promise`\<`void`\>
|
|
1448
|
+
|
|
1449
|
+
***
|
|
1450
|
+
|
|
979
1451
|
### blockResources()
|
|
980
1452
|
|
|
981
1453
|
> **blockResources**(`types`, `overwrite?`): `Promise`\<`number`\>
|
|
982
1454
|
|
|
983
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1455
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1385](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1385)
|
|
984
1456
|
|
|
985
1457
|
Blocks specified resource types from loading.
|
|
986
1458
|
|
|
@@ -1021,7 +1493,7 @@ await engine.blockResources(['script'], true); // Replace existing
|
|
|
1021
1493
|
|
|
1022
1494
|
> `protected` **buildResponse**(`context`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\>
|
|
1023
1495
|
|
|
1024
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1496
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:659](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L659)
|
|
1025
1497
|
|
|
1026
1498
|
#### Parameters
|
|
1027
1499
|
|
|
@@ -1043,7 +1515,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:723](https://github.com/isd
|
|
|
1043
1515
|
|
|
1044
1516
|
> **cleanup**(): `Promise`\<`void`\>
|
|
1045
1517
|
|
|
1046
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1518
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1065](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1065)
|
|
1047
1519
|
|
|
1048
1520
|
#### Returns
|
|
1049
1521
|
|
|
@@ -1059,7 +1531,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:1084](https://github.com/is
|
|
|
1059
1531
|
|
|
1060
1532
|
> **click**(`selector`): `Promise`\<`void`\>
|
|
1061
1533
|
|
|
1062
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1534
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:753](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L753)
|
|
1063
1535
|
|
|
1064
1536
|
Clicks on element matching selector.
|
|
1065
1537
|
|
|
@@ -1093,7 +1565,7 @@ When no active page context exists
|
|
|
1093
1565
|
|
|
1094
1566
|
> **cookies**(): `Promise`\<[`Cookie`](../interfaces/Cookie.md)[]\>
|
|
1095
1567
|
|
|
1096
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1568
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1501](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1501)
|
|
1097
1569
|
|
|
1098
1570
|
Manages cookies for current session with multiple overloads.
|
|
1099
1571
|
|
|
@@ -1122,7 +1594,7 @@ await engine.cookies([{ name: 'session', value: '123' }]);
|
|
|
1122
1594
|
|
|
1123
1595
|
> **cookies**(`cookies`): `Promise`\<`boolean`\>
|
|
1124
1596
|
|
|
1125
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1597
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1502](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1502)
|
|
1126
1598
|
|
|
1127
1599
|
Manages cookies for current session with multiple overloads.
|
|
1128
1600
|
|
|
@@ -1161,7 +1633,7 @@ await engine.cookies([{ name: 'session', value: '123' }]);
|
|
|
1161
1633
|
|
|
1162
1634
|
> `protected` **dispatchAction**\<`T`\>(`action`): `Promise`\<`T`\>
|
|
1163
1635
|
|
|
1164
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1636
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1292](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1292)
|
|
1165
1637
|
|
|
1166
1638
|
#### Type Parameters
|
|
1167
1639
|
|
|
@@ -1189,7 +1661,7 @@ Defined in: [packages/web-fetcher/src/engine/base.ts:1219](https://github.com/is
|
|
|
1189
1661
|
|
|
1190
1662
|
> **dispose**(): `Promise`\<`void`\>
|
|
1191
1663
|
|
|
1192
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1664
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1537](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1537)
|
|
1193
1665
|
|
|
1194
1666
|
Disposes of engine, cleaning up all resources.
|
|
1195
1667
|
|
|
@@ -1205,11 +1677,57 @@ Promise resolving when disposal completes
|
|
|
1205
1677
|
|
|
1206
1678
|
***
|
|
1207
1679
|
|
|
1680
|
+
### evaluate()
|
|
1681
|
+
|
|
1682
|
+
> **evaluate**(`params`): `Promise`\<`any`\>
|
|
1683
|
+
|
|
1684
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:873](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L873)
|
|
1685
|
+
|
|
1686
|
+
Executes a custom function or expression within the current page context.
|
|
1687
|
+
|
|
1688
|
+
#### Parameters
|
|
1689
|
+
|
|
1690
|
+
##### params
|
|
1691
|
+
|
|
1692
|
+
[`EvaluateActionOptions`](../interfaces/EvaluateActionOptions.md)
|
|
1693
|
+
|
|
1694
|
+
Configuration for the execution, including the function and arguments.
|
|
1695
|
+
|
|
1696
|
+
#### Returns
|
|
1697
|
+
|
|
1698
|
+
`Promise`\<`any`\>
|
|
1699
|
+
|
|
1700
|
+
A promise resolving to the result of the execution.
|
|
1701
|
+
|
|
1702
|
+
#### Remarks
|
|
1703
|
+
|
|
1704
|
+
This is a powerful action that allows running custom logic to interact with the DOM,
|
|
1705
|
+
calculate values, or trigger navigations.
|
|
1706
|
+
|
|
1707
|
+
- In **Browser Mode**, it runs in the real browser.
|
|
1708
|
+
- In **HTTP Mode**, it runs in a Node.js sandbox with a mocked DOM.
|
|
1709
|
+
|
|
1710
|
+
The action handles automatic navigation if `window.location` is modified.
|
|
1711
|
+
|
|
1712
|
+
#### Throws
|
|
1713
|
+
|
|
1714
|
+
If no active page context exists or if execution fails.
|
|
1715
|
+
|
|
1716
|
+
#### See
|
|
1717
|
+
|
|
1718
|
+
[EvaluateActionOptions](../interfaces/EvaluateActionOptions.md) for detailed parameter options and examples.
|
|
1719
|
+
|
|
1720
|
+
#### Inherited from
|
|
1721
|
+
|
|
1722
|
+
[`FetchEngine`](FetchEngine.md).[`evaluate`](FetchEngine.md#evaluate)
|
|
1723
|
+
|
|
1724
|
+
***
|
|
1725
|
+
|
|
1208
1726
|
### executeAction()
|
|
1209
1727
|
|
|
1210
1728
|
> `protected` **executeAction**(`context`, `action`): `Promise`\<`any`\>
|
|
1211
1729
|
|
|
1212
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:
|
|
1730
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:520](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L520)
|
|
1213
1731
|
|
|
1214
1732
|
**`Internal`**
|
|
1215
1733
|
|
|
@@ -1249,7 +1767,7 @@ Handles specific user interactions using underlying technology (Playwright/Cheer
|
|
|
1249
1767
|
|
|
1250
1768
|
> **extract**\<`T`\>(`schema`): `Promise`\<`T`\>
|
|
1251
1769
|
|
|
1252
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1770
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:883](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L883)
|
|
1253
1771
|
|
|
1254
1772
|
Extracts structured data from the current page content.
|
|
1255
1773
|
|
|
@@ -1283,7 +1801,7 @@ A promise that resolves to an object with the extracted data.
|
|
|
1283
1801
|
|
|
1284
1802
|
> **fill**(`selector`, `value`): `Promise`\<`void`\>
|
|
1285
1803
|
|
|
1286
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1804
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:817](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L817)
|
|
1287
1805
|
|
|
1288
1806
|
Fills input element with specified value.
|
|
1289
1807
|
|
|
@@ -1321,7 +1839,7 @@ When no active page context exists
|
|
|
1321
1839
|
|
|
1322
1840
|
> **getContent**(): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\>
|
|
1323
1841
|
|
|
1324
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1842
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1399](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1399)
|
|
1325
1843
|
|
|
1326
1844
|
Gets content of current page.
|
|
1327
1845
|
|
|
@@ -1345,7 +1863,7 @@ When no content has been fetched yet
|
|
|
1345
1863
|
|
|
1346
1864
|
> **getState**(): `Promise`\<\{ `cookies`: [`Cookie`](../interfaces/Cookie.md)[]; `sessionState?`: `any`; \}\>
|
|
1347
1865
|
|
|
1348
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1866
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:902](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L902)
|
|
1349
1867
|
|
|
1350
1868
|
Returns the current state of the engine (cookies)
|
|
1351
1869
|
that can be used to restore the session later.
|
|
@@ -1364,7 +1882,7 @@ that can be used to restore the session later.
|
|
|
1364
1882
|
|
|
1365
1883
|
> **goto**(`url`, `opts?`): `Promise`\<[`FetchResponse`](../interfaces/FetchResponse.md)\>
|
|
1366
1884
|
|
|
1367
|
-
Defined in: [packages/web-fetcher/src/engine/playwright.ts:
|
|
1885
|
+
Defined in: [packages/web-fetcher/src/engine/playwright.ts:865](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/playwright.ts#L865)
|
|
1368
1886
|
|
|
1369
1887
|
Navigates to the specified URL.
|
|
1370
1888
|
|
|
@@ -1404,7 +1922,7 @@ await engine.goto('https://example.com');
|
|
|
1404
1922
|
|
|
1405
1923
|
> **headers**(): `Promise`\<`Record`\<`string`, `string`\>\>
|
|
1406
1924
|
|
|
1407
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1925
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1440](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1440)
|
|
1408
1926
|
|
|
1409
1927
|
Manages HTTP headers for requests with multiple overloads.
|
|
1410
1928
|
|
|
@@ -1435,7 +1953,7 @@ await engine.headers('auth', 'token');
|
|
|
1435
1953
|
|
|
1436
1954
|
> **headers**(`name`): `Promise`\<`string`\>
|
|
1437
1955
|
|
|
1438
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1956
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1441](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1441)
|
|
1439
1957
|
|
|
1440
1958
|
Manages HTTP headers for requests with multiple overloads.
|
|
1441
1959
|
|
|
@@ -1474,7 +1992,7 @@ await engine.headers('auth', 'token');
|
|
|
1474
1992
|
|
|
1475
1993
|
> **headers**(`headers`, `replaced?`): `Promise`\<`boolean`\>
|
|
1476
1994
|
|
|
1477
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
1995
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1442](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1442)
|
|
1478
1996
|
|
|
1479
1997
|
Manages HTTP headers for requests with multiple overloads.
|
|
1480
1998
|
|
|
@@ -1519,7 +2037,7 @@ await engine.headers('auth', 'token');
|
|
|
1519
2037
|
|
|
1520
2038
|
> **headers**(`name`, `value`): `Promise`\<`boolean`\>
|
|
1521
2039
|
|
|
1522
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
2040
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:1446](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L1446)
|
|
1523
2041
|
|
|
1524
2042
|
Manages HTTP headers for requests with multiple overloads.
|
|
1525
2043
|
|
|
@@ -1537,7 +2055,7 @@ Header name
|
|
|
1537
2055
|
|
|
1538
2056
|
Header value or `null` to remove
|
|
1539
2057
|
|
|
1540
|
-
`
|
|
2058
|
+
`string` | `null`
|
|
1541
2059
|
|
|
1542
2060
|
##### Returns
|
|
1543
2061
|
|
|
@@ -1566,7 +2084,7 @@ await engine.headers('auth', 'token');
|
|
|
1566
2084
|
|
|
1567
2085
|
> **initialize**(`context`, `options?`): `Promise`\<`void`\>
|
|
1568
2086
|
|
|
1569
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
2087
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:934](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L934)
|
|
1570
2088
|
|
|
1571
2089
|
Initializes the fetch engine with provided context and options.
|
|
1572
2090
|
|
|
@@ -1601,11 +2119,159 @@ Automatically called when creating engine via `FetchEngine.create()`.
|
|
|
1601
2119
|
|
|
1602
2120
|
***
|
|
1603
2121
|
|
|
2122
|
+
### keyboardPress()
|
|
2123
|
+
|
|
2124
|
+
> **keyboardPress**(`key`, `delay?`): `Promise`\<`void`\>
|
|
2125
|
+
|
|
2126
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:802](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L802)
|
|
2127
|
+
|
|
2128
|
+
Presses specified key.
|
|
2129
|
+
|
|
2130
|
+
#### Parameters
|
|
2131
|
+
|
|
2132
|
+
##### key
|
|
2133
|
+
|
|
2134
|
+
`string`
|
|
2135
|
+
|
|
2136
|
+
Key to press
|
|
2137
|
+
|
|
2138
|
+
##### delay?
|
|
2139
|
+
|
|
2140
|
+
`number`
|
|
2141
|
+
|
|
2142
|
+
Delay after key press
|
|
2143
|
+
|
|
2144
|
+
#### Returns
|
|
2145
|
+
|
|
2146
|
+
`Promise`\<`void`\>
|
|
2147
|
+
|
|
2148
|
+
#### Inherited from
|
|
2149
|
+
|
|
2150
|
+
[`FetchEngine`](FetchEngine.md).[`keyboardPress`](FetchEngine.md#keyboardpress)
|
|
2151
|
+
|
|
2152
|
+
***
|
|
2153
|
+
|
|
2154
|
+
### keyboardType()
|
|
2155
|
+
|
|
2156
|
+
> **keyboardType**(`text`, `delay?`): `Promise`\<`void`\>
|
|
2157
|
+
|
|
2158
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:792](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L792)
|
|
2159
|
+
|
|
2160
|
+
Types text into current focused element.
|
|
2161
|
+
|
|
2162
|
+
#### Parameters
|
|
2163
|
+
|
|
2164
|
+
##### text
|
|
2165
|
+
|
|
2166
|
+
`string`
|
|
2167
|
+
|
|
2168
|
+
Text to type
|
|
2169
|
+
|
|
2170
|
+
##### delay?
|
|
2171
|
+
|
|
2172
|
+
`number`
|
|
2173
|
+
|
|
2174
|
+
Delay between key presses
|
|
2175
|
+
|
|
2176
|
+
#### Returns
|
|
2177
|
+
|
|
2178
|
+
`Promise`\<`void`\>
|
|
2179
|
+
|
|
2180
|
+
#### Inherited from
|
|
2181
|
+
|
|
2182
|
+
[`FetchEngine`](FetchEngine.md).[`keyboardType`](FetchEngine.md#keyboardtype)
|
|
2183
|
+
|
|
2184
|
+
***
|
|
2185
|
+
|
|
2186
|
+
### mouseClick()
|
|
2187
|
+
|
|
2188
|
+
> **mouseClick**(`params`): `Promise`\<`void`\>
|
|
2189
|
+
|
|
2190
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:776](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L776)
|
|
2191
|
+
|
|
2192
|
+
Clicks at current position or specified position.
|
|
2193
|
+
|
|
2194
|
+
#### Parameters
|
|
2195
|
+
|
|
2196
|
+
##### params
|
|
2197
|
+
|
|
2198
|
+
Click parameters (x, y, button, clickCount, delay)
|
|
2199
|
+
|
|
2200
|
+
###### button?
|
|
2201
|
+
|
|
2202
|
+
`"left"` \| `"right"` \| `"middle"`
|
|
2203
|
+
|
|
2204
|
+
###### clickCount?
|
|
2205
|
+
|
|
2206
|
+
`number`
|
|
2207
|
+
|
|
2208
|
+
###### delay?
|
|
2209
|
+
|
|
2210
|
+
`number`
|
|
2211
|
+
|
|
2212
|
+
###### x?
|
|
2213
|
+
|
|
2214
|
+
`number`
|
|
2215
|
+
|
|
2216
|
+
###### y?
|
|
2217
|
+
|
|
2218
|
+
`number`
|
|
2219
|
+
|
|
2220
|
+
#### Returns
|
|
2221
|
+
|
|
2222
|
+
`Promise`\<`void`\>
|
|
2223
|
+
|
|
2224
|
+
#### Inherited from
|
|
2225
|
+
|
|
2226
|
+
[`FetchEngine`](FetchEngine.md).[`mouseClick`](FetchEngine.md#mouseclick)
|
|
2227
|
+
|
|
2228
|
+
***
|
|
2229
|
+
|
|
2230
|
+
### mouseMove()
|
|
2231
|
+
|
|
2232
|
+
> **mouseMove**(`params`): `Promise`\<`void`\>
|
|
2233
|
+
|
|
2234
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:762](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L762)
|
|
2235
|
+
|
|
2236
|
+
Moves mouse to specified position or element.
|
|
2237
|
+
|
|
2238
|
+
#### Parameters
|
|
2239
|
+
|
|
2240
|
+
##### params
|
|
2241
|
+
|
|
2242
|
+
Move parameters (x, y, selector, steps)
|
|
2243
|
+
|
|
2244
|
+
###### selector?
|
|
2245
|
+
|
|
2246
|
+
`string`
|
|
2247
|
+
|
|
2248
|
+
###### steps?
|
|
2249
|
+
|
|
2250
|
+
`number`
|
|
2251
|
+
|
|
2252
|
+
###### x?
|
|
2253
|
+
|
|
2254
|
+
`number`
|
|
2255
|
+
|
|
2256
|
+
###### y?
|
|
2257
|
+
|
|
2258
|
+
`number`
|
|
2259
|
+
|
|
2260
|
+
#### Returns
|
|
2261
|
+
|
|
2262
|
+
`Promise`\<`void`\>
|
|
2263
|
+
|
|
2264
|
+
#### Inherited from
|
|
2265
|
+
|
|
2266
|
+
[`FetchEngine`](FetchEngine.md).[`mouseMove`](FetchEngine.md#mousemove)
|
|
2267
|
+
|
|
2268
|
+
***
|
|
2269
|
+
|
|
1604
2270
|
### pause()
|
|
1605
2271
|
|
|
1606
2272
|
> **pause**(`message?`): `Promise`\<`void`\>
|
|
1607
2273
|
|
|
1608
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
2274
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:851](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L851)
|
|
1609
2275
|
|
|
1610
2276
|
Pauses execution, allowing for manual intervention or inspection.
|
|
1611
2277
|
|
|
@@ -1637,7 +2303,7 @@ When no active page context exists
|
|
|
1637
2303
|
|
|
1638
2304
|
> **submit**(`selector?`, `options?`): `Promise`\<`void`\>
|
|
1639
2305
|
|
|
1640
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
2306
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:829](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L829)
|
|
1641
2307
|
|
|
1642
2308
|
Submits a form.
|
|
1643
2309
|
|
|
@@ -1671,11 +2337,43 @@ When no active page context exists
|
|
|
1671
2337
|
|
|
1672
2338
|
***
|
|
1673
2339
|
|
|
2340
|
+
### trim()
|
|
2341
|
+
|
|
2342
|
+
> **trim**(`options`): `Promise`\<`void`\>
|
|
2343
|
+
|
|
2344
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:840](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L840)
|
|
2345
|
+
|
|
2346
|
+
Removes elements from the DOM based on selectors and presets.
|
|
2347
|
+
|
|
2348
|
+
#### Parameters
|
|
2349
|
+
|
|
2350
|
+
##### options
|
|
2351
|
+
|
|
2352
|
+
[`TrimActionOptions`](../interfaces/TrimActionOptions.md)
|
|
2353
|
+
|
|
2354
|
+
Trim options specifying selectors and presets
|
|
2355
|
+
|
|
2356
|
+
#### Returns
|
|
2357
|
+
|
|
2358
|
+
`Promise`\<`void`\>
|
|
2359
|
+
|
|
2360
|
+
Promise resolving when trim operation completes
|
|
2361
|
+
|
|
2362
|
+
#### Throws
|
|
2363
|
+
|
|
2364
|
+
When no active page context exists
|
|
2365
|
+
|
|
2366
|
+
#### Inherited from
|
|
2367
|
+
|
|
2368
|
+
[`FetchEngine`](FetchEngine.md).[`trim`](FetchEngine.md#trim)
|
|
2369
|
+
|
|
2370
|
+
***
|
|
2371
|
+
|
|
1674
2372
|
### waitFor()
|
|
1675
2373
|
|
|
1676
2374
|
> **waitFor**(`params?`): `Promise`\<`void`\>
|
|
1677
2375
|
|
|
1678
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
2376
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:742](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L742)
|
|
1679
2377
|
|
|
1680
2378
|
Waits for specified condition before continuing.
|
|
1681
2379
|
|
|
@@ -1708,9 +2406,9 @@ await engine.waitFor({ selector: '#content' }); // Wait for element
|
|
|
1708
2406
|
|
|
1709
2407
|
### create()
|
|
1710
2408
|
|
|
1711
|
-
> `static` **create**(`ctx`, `options?`): `Promise`\<`
|
|
2409
|
+
> `static` **create**(`ctx`, `options?`): `Promise`\<`AnyFetchEngine` \| `undefined`\>
|
|
1712
2410
|
|
|
1713
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
2411
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:349](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L349)
|
|
1714
2412
|
|
|
1715
2413
|
Factory method to create and initialize a fetch engine instance.
|
|
1716
2414
|
|
|
@@ -1730,7 +2428,7 @@ Configuration options
|
|
|
1730
2428
|
|
|
1731
2429
|
#### Returns
|
|
1732
2430
|
|
|
1733
|
-
`Promise`\<`
|
|
2431
|
+
`Promise`\<`AnyFetchEngine` \| `undefined`\>
|
|
1734
2432
|
|
|
1735
2433
|
Initialized fetch engine instance
|
|
1736
2434
|
|
|
@@ -1750,9 +2448,9 @@ Primary entry point for engine creation. Selects appropriate implementation base
|
|
|
1750
2448
|
|
|
1751
2449
|
### get()
|
|
1752
2450
|
|
|
1753
|
-
> `static` **get**(`id`): `
|
|
2451
|
+
> `static` **get**(`id`): `AnyFetchEngineCtor` \| `undefined`
|
|
1754
2452
|
|
|
1755
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
2453
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:322](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L322)
|
|
1756
2454
|
|
|
1757
2455
|
Retrieves a fetch engine implementation by its unique ID.
|
|
1758
2456
|
|
|
@@ -1766,7 +2464,7 @@ The ID of the engine to retrieve
|
|
|
1766
2464
|
|
|
1767
2465
|
#### Returns
|
|
1768
2466
|
|
|
1769
|
-
`
|
|
2467
|
+
`AnyFetchEngineCtor` \| `undefined`
|
|
1770
2468
|
|
|
1771
2469
|
Engine class if found, otherwise `undefined`
|
|
1772
2470
|
|
|
@@ -1778,9 +2476,9 @@ Engine class if found, otherwise `undefined`
|
|
|
1778
2476
|
|
|
1779
2477
|
### getByMode()
|
|
1780
2478
|
|
|
1781
|
-
> `static` **getByMode**(`mode`): `
|
|
2479
|
+
> `static` **getByMode**(`mode`): `AnyFetchEngineCtor` \| `undefined`
|
|
1782
2480
|
|
|
1783
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
2481
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:332](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L332)
|
|
1784
2482
|
|
|
1785
2483
|
Retrieves a fetch engine implementation by execution mode.
|
|
1786
2484
|
|
|
@@ -1794,7 +2492,7 @@ Execution mode (`'http'` or `'browser'`)
|
|
|
1794
2492
|
|
|
1795
2493
|
#### Returns
|
|
1796
2494
|
|
|
1797
|
-
`
|
|
2495
|
+
`AnyFetchEngineCtor` \| `undefined`
|
|
1798
2496
|
|
|
1799
2497
|
Engine class if found, otherwise `undefined`
|
|
1800
2498
|
|
|
@@ -1808,7 +2506,7 @@ Engine class if found, otherwise `undefined`
|
|
|
1808
2506
|
|
|
1809
2507
|
> `static` **register**(`engineClass`): `void`
|
|
1810
2508
|
|
|
1811
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:
|
|
2509
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:309](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/engine/base.ts#L309)
|
|
1812
2510
|
|
|
1813
2511
|
Registers a fetch engine implementation with the global registry.
|
|
1814
2512
|
|