@spider-cloud/spider-client 0.0.63 → 0.0.64

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.
Files changed (2) hide show
  1. package/dist/config.d.ts +11 -0
  2. package/package.json +1 -1
package/dist/config.d.ts CHANGED
@@ -95,6 +95,13 @@ export interface QueryRequest {
95
95
  */
96
96
  pathname?: string;
97
97
  }
98
+ type CSSSelector = {
99
+ name: string;
100
+ selectors: string[];
101
+ };
102
+ type CSSExtractionMap = {
103
+ [path: string]: CSSSelector[];
104
+ };
98
105
  /**
99
106
  * Represents the options available for making a spider request.
100
107
  */
@@ -163,6 +170,10 @@ export interface SpiderParams {
163
170
  * Specifies whether to include metadata in the response.
164
171
  */
165
172
  metadata?: boolean;
173
+ /**
174
+ * Use CSS query selectors to scrape contents from the web page. Set the paths and the CSS extraction object map to perform extractions per path or page.
175
+ */
176
+ css_extraction_map?: CSSExtractionMap;
166
177
  /**
167
178
  * The dimensions of the viewport.
168
179
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spider-cloud/spider-client",
3
- "version": "0.0.63",
3
+ "version": "0.0.64",
4
4
  "description": "Isomorphic Javascript SDK for Spider Cloud services",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test __tests__/*test.ts",