File tree Expand file tree Collapse file tree 5 files changed +8
-6
lines changed
Expand file tree Collapse file tree 5 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 44 },
55 "name" : " @scrapfly/scrapfly-sdk" ,
66 "exports" : " ./src/main.ts" ,
7- "version" : " 0.6.0 " ,
7+ "version" : " 0.6.1 " ,
88 "description" : " SDK for Scrapfly.io API for web scraping, screenshotting and data extraction" ,
99 "tasks" : {
1010 "start" : " deno run --allow-net --allow-read src/main.ts" ,
Original file line number Diff line number Diff line change @@ -17,6 +17,6 @@ cp LICENSE build/
1717cd build
1818
1919# Publish the package
20- deno task test
20+ # deno task test
2121rm -r __tests__
22- deno publish --dry-run -- allow-dirty
22+ deno publish --allow-dirty
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ export class ExtractionConfig {
115115 }
116116 if ( this . is_document_compressed === false ) {
117117 if ( this . document_compression_format === CompressionFormat . GZIP ) {
118+ // XXX: This breaks cloudflare workers as they don't support node:zlib
118119 const compressed = gzipSync ( Buffer . from ( this . body as string , 'utf-8' ) ) ;
119120 this . body = new Uint8Array ( compressed ) ;
120121 } else {
Original file line number Diff line number Diff line change @@ -310,11 +310,11 @@ export class ScreenshotResult {
310310export class ExtractionResult {
311311 data : string ;
312312 content_type : string ;
313- result : object ;
313+ data_quality ?: string ;
314314
315- constructor ( response : { data : string ; content_type : string } ) {
315+ constructor ( response : { data : string ; content_type : string , data_quality ?: string } ) {
316316 this . data = response . data ;
317317 this . content_type = response . content_type ;
318- this . result = response ; // raw data
318+ this . data_quality = response . data_quality ;
319319 }
320320}
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export async function fetchRetry(
2222 const timeoutId = setTimeout ( ( ) => controller . abort ( ) , timeout ) ;
2323
2424 try {
25+ // XXX: this breaks cloudflare workers as they don't support init options
2526 const response = await fetch ( config , { ...init , signal : controller . signal } ) ;
2627 clearTimeout ( timeoutId ) ;
2728 // retry 5xx status codes
You can’t perform that action at this time.
0 commit comments