@spider-cloud/spider-client 0.0.62 → 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.
- package/dist/config.d.ts +13 -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
|
*/
|
|
@@ -208,9 +219,9 @@ export interface SpiderParams {
|
|
|
208
219
|
*/
|
|
209
220
|
respect_robots?: boolean;
|
|
210
221
|
/**
|
|
211
|
-
* CSS selector to be used to filter the content.
|
|
222
|
+
* CSS root selector to be used to filter the content.
|
|
212
223
|
*/
|
|
213
|
-
|
|
224
|
+
root_selector?: string;
|
|
214
225
|
/**
|
|
215
226
|
* Specifies whether to load all resources of the crawl target.
|
|
216
227
|
*/
|