@spider-cloud/spider-client 0.0.68 → 0.0.70
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 +12 -0
- package/dist/config.js +7 -1
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -128,6 +128,10 @@ export type WebAutomation = {
|
|
|
128
128
|
};
|
|
129
129
|
export type WebAutomationMap = Record<string, WebAutomation[]>;
|
|
130
130
|
export type ExecutionScriptsMap = Record<string, string>;
|
|
131
|
+
export declare enum RedirectPolicy {
|
|
132
|
+
Loose = "Loose",
|
|
133
|
+
Strict = "Strict"
|
|
134
|
+
}
|
|
131
135
|
/**
|
|
132
136
|
* Represents the options available for making a spider request.
|
|
133
137
|
*/
|
|
@@ -272,6 +276,10 @@ export interface SpiderParams {
|
|
|
272
276
|
* Returns the HTTP response headers used.
|
|
273
277
|
*/
|
|
274
278
|
return_headers?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Returns the link(s) found on the page that match the crawler query.
|
|
281
|
+
*/
|
|
282
|
+
return_page_links?: boolean;
|
|
275
283
|
/**
|
|
276
284
|
* Returns the HTTP response cookies used.
|
|
277
285
|
*/
|
|
@@ -312,6 +320,10 @@ export interface SpiderParams {
|
|
|
312
320
|
* Perform custom Javascript tasks on a url or url path. You need to make your `request` `chrome` or `smart`.
|
|
313
321
|
*/
|
|
314
322
|
execution_scripts?: ExecutionScriptsMap;
|
|
323
|
+
/**
|
|
324
|
+
* The redirect policy for HTTP request. Set the value to Loose to allow all.
|
|
325
|
+
*/
|
|
326
|
+
redirect_policy?: RedirectPolicy;
|
|
315
327
|
}
|
|
316
328
|
export type SpiderCoreResponse = {
|
|
317
329
|
content?: string;
|
package/dist/config.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setBaseUrl = exports.APISchema = exports.APIRoutes = exports.ApiVersion = exports.Collection = void 0;
|
|
3
|
+
exports.setBaseUrl = exports.APISchema = exports.APIRoutes = exports.ApiVersion = exports.Collection = exports.RedirectPolicy = void 0;
|
|
4
|
+
// The HTTP redirect policy to use. Loose allows all domains and Strict only allows relative requests to the domain.
|
|
5
|
+
var RedirectPolicy;
|
|
6
|
+
(function (RedirectPolicy) {
|
|
7
|
+
RedirectPolicy["Loose"] = "Loose";
|
|
8
|
+
RedirectPolicy["Strict"] = "Strict";
|
|
9
|
+
})(RedirectPolicy || (exports.RedirectPolicy = RedirectPolicy = {}));
|
|
4
10
|
// records that you can query
|
|
5
11
|
var Collection;
|
|
6
12
|
(function (Collection) {
|