@spider-cloud/spider-client 0.1.84 → 0.1.85

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/client.d.ts CHANGED
@@ -66,6 +66,13 @@ export declare class Spider {
66
66
  * @returns {Promise<any>} The screenshot data.
67
67
  */
68
68
  screenshot(url: string, params?: GenericParams): Promise<any>;
69
+ /**
70
+ * Unblock a challenging url to get data.
71
+ * @param {string} url - The URL to get data from.
72
+ * @param {GenericParams} [params={}] - Configuration parameters for the screenshot.
73
+ * @returns {Promise<any>} The screenshot data.
74
+ */
75
+ unblocker(url: string, params?: GenericParams): Promise<any>;
69
76
  /**
70
77
  * Perform a search and gather a list of websites to start crawling and collect resources.
71
78
  * @param {string} search - The search query.
package/dist/client.js CHANGED
@@ -117,6 +117,15 @@ class Spider {
117
117
  async screenshot(url, params = {}) {
118
118
  return this._apiPost(config_1.APIRoutes.Screenshot, { url: url, ...params });
119
119
  }
120
+ /**
121
+ * Unblock a challenging url to get data.
122
+ * @param {string} url - The URL to get data from.
123
+ * @param {GenericParams} [params={}] - Configuration parameters for the screenshot.
124
+ * @returns {Promise<any>} The screenshot data.
125
+ */
126
+ async unblocker(url, params = {}) {
127
+ return this._apiPost(config_1.APIRoutes.Unblocker, { url: url, ...params });
128
+ }
120
129
  /**
121
130
  * Perform a search and gather a list of websites to start crawling and collect resources.
122
131
  * @param {string} search - The search query.
package/dist/config.d.ts CHANGED
@@ -591,6 +591,8 @@ export declare enum ApiVersion {
591
591
  }
592
592
  export declare enum APIRoutes {
593
593
  Crawl = "crawl",
594
+ Scrape = "scrape",
595
+ Unblocker = "unblocker",
594
596
  Links = "links",
595
597
  Screenshot = "screenshot",
596
598
  Search = "search",
package/dist/config.js CHANGED
@@ -32,6 +32,10 @@ var APIRoutes;
32
32
  (function (APIRoutes) {
33
33
  // Crawl a website to collect the contents. Can be one page or many.
34
34
  APIRoutes["Crawl"] = "crawl";
35
+ // Scrape a website to collect the contents. Can be one page or many.
36
+ APIRoutes["Scrape"] = "scrape";
37
+ // Unblock a website to collect the contents. Can be one page or many.
38
+ APIRoutes["Unblocker"] = "unblocker";
35
39
  // Crawl a website to collect the links. Can be one page or many.
36
40
  APIRoutes["Links"] = "links";
37
41
  // Crawl a website to collect screenshots. Can be one page or many.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spider-cloud/spider-client",
3
- "version": "0.1.84",
3
+ "version": "0.1.85",
4
4
  "description": "Isomorphic Javascript SDK for Spider Cloud services",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test __tests__/*test.ts",