You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// First, scrape the web page to retrieve its HTML
10
+
constscrapeResult=awaitclient.scrape(
11
+
newScrapeConfig({
12
+
url: 'https://web-scraping.dev/reviews',
13
+
render_js: true,
14
+
auto_scroll: true
15
+
}),
16
+
);
17
+
18
+
consthtml=scrapeResult.result.content;
19
+
20
+
constextractionResult=awaitclient.extract(
21
+
newExtractionConfig({
22
+
body: html,// pass the scraped HTML content
23
+
content_type: 'text/html',
24
+
charset: 'utf-8',
25
+
extraction_model: 'review_list',
26
+
is_document_compressed: false,// specify that the sent document is not compressed to compress it
27
+
document_compression_format: CompressionFormat.GZIP// specify that compression format
28
+
// If both is_document_compressed and document_compression_format are ignored, the raw HTML sould be sent
29
+
// If is_document_compressed is set to false and CompressionFormat set to GZIP, the SDK will automatically compress the document to gzip
30
+
// is_document_compressed is set to false and CompressionFormat set to ZSTD or DEFLATE, the document passed to ExtractionConfig must be manually compressed
`Auto compression for ${this.document_compression_format} format isn't available. You can manually compress to ${this.document_compression_format} or choose the gzip format for auto compression`,
0 commit comments