@spider-cloud/spider-client 0.1.80 → 0.1.82
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/dist/config.d.ts +27 -1
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -98,13 +98,17 @@ interface Delay {
|
|
|
98
98
|
/**
|
|
99
99
|
* Represents the wait_for configuration.
|
|
100
100
|
* @typedef {Object} WaitFor
|
|
101
|
-
* @property {IdleNetwork} [idle_network] - Configuration to wait for network to be idle.
|
|
101
|
+
* @property {IdleNetwork} [idle_network] - Configuration to wait for network to be idle between period.
|
|
102
|
+
* @property {IdleNetwork0} [idle_network] - Configuration to wait for network to be idle with max timeout.
|
|
103
|
+
* @property {AlmostIdleNetwork0} [idle_network] - Configuration to wait for network to almost idle with max timeout.
|
|
102
104
|
* @property {Selector} [selector] - Configuration to wait for a CSS selector.
|
|
103
105
|
* @property {Delay} [delay] - Configuration to wait for a delay.
|
|
104
106
|
* @property {boolean} [page_navigations] - Whether to wait for page navigations.
|
|
105
107
|
*/
|
|
106
108
|
export interface WaitForConfiguration {
|
|
107
109
|
idle_network?: IdleNetwork;
|
|
110
|
+
idle_network0?: IdleNetwork;
|
|
111
|
+
almost_idle_network0?: IdleNetwork;
|
|
108
112
|
selector?: Selector;
|
|
109
113
|
dom?: Selector;
|
|
110
114
|
delay?: Delay;
|
|
@@ -222,6 +226,27 @@ export type EventTracker = {
|
|
|
222
226
|
* - 'isp' → ISP-grade residential (alias: 'datacenter')
|
|
223
227
|
*/
|
|
224
228
|
export type Proxy = "residential" | "mobile" | "isp";
|
|
229
|
+
export type LinkRewriteReplace = {
|
|
230
|
+
type: "replace";
|
|
231
|
+
/**
|
|
232
|
+
* Only apply when the link's host matches this value.
|
|
233
|
+
* Optional key; null means "no host filter".
|
|
234
|
+
*/
|
|
235
|
+
host?: string | null;
|
|
236
|
+
find: string;
|
|
237
|
+
replace_with: string;
|
|
238
|
+
};
|
|
239
|
+
export type LinkRewriteRegex = {
|
|
240
|
+
type: "regex";
|
|
241
|
+
/**
|
|
242
|
+
* Only apply when the link's host matches this value.
|
|
243
|
+
* Optional key; null means "no host filter".
|
|
244
|
+
*/
|
|
245
|
+
host?: string | null;
|
|
246
|
+
pattern: string;
|
|
247
|
+
replace_with: string;
|
|
248
|
+
};
|
|
249
|
+
export type LinkRewriteRule = LinkRewriteReplace | LinkRewriteRegex;
|
|
225
250
|
/**
|
|
226
251
|
* Represents the options available for making a spider request.
|
|
227
252
|
*/
|
|
@@ -314,6 +339,7 @@ export interface SpiderParams {
|
|
|
314
339
|
* Use webhooks to send data.
|
|
315
340
|
*/
|
|
316
341
|
webhooks?: WebhookSettings;
|
|
342
|
+
link_rewrite?: LinkRewriteRule;
|
|
317
343
|
/**
|
|
318
344
|
* Specifies whether to use fingerprinting protection.
|
|
319
345
|
*/
|