@spider-cloud/spider-client 0.1.81 → 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 +22 -0
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -226,6 +226,27 @@ export type EventTracker = {
|
|
|
226
226
|
* - 'isp' → ISP-grade residential (alias: 'datacenter')
|
|
227
227
|
*/
|
|
228
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;
|
|
229
250
|
/**
|
|
230
251
|
* Represents the options available for making a spider request.
|
|
231
252
|
*/
|
|
@@ -318,6 +339,7 @@ export interface SpiderParams {
|
|
|
318
339
|
* Use webhooks to send data.
|
|
319
340
|
*/
|
|
320
341
|
webhooks?: WebhookSettings;
|
|
342
|
+
link_rewrite?: LinkRewriteRule;
|
|
321
343
|
/**
|
|
322
344
|
* Specifies whether to use fingerprinting protection.
|
|
323
345
|
*/
|