From ffad36730c894e3fe004ba3a7b9a2f386ae31fd8 Mon Sep 17 00:00:00 2001 From: Matteo Cargnelutti Date: Tue, 9 Jul 2024 16:43:08 -0400 Subject: [PATCH 1/3] Temporary workaround for zstd compression --- Scoop.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Scoop.js b/Scoop.js index 5a0a032..cf35d78 100644 --- a/Scoop.js +++ b/Scoop.js @@ -604,7 +604,16 @@ export class Scoop { const context = await this.#browser.newContext({ ...this.intercepter.contextOptions, - userAgent + userAgent, + // NOTE: + // This is a temporary workaround. + // Most browsers' now accepts zstd, but most of the web archiving stack (indexing, playback ...) is not ready to handle it yet. + // This line wants to be removed once the ecosystem is ready for zstd. + // More on zstd: https://datatracker.ietf.org/doc/html/rfc8878 + // TODO: Remove whenever possible. + extraHTTPHeaders: { + 'Accept-Encoding': 'gzip, compress, deflate, br' + } }) const page = await context.newPage() From 168630ce243bd37134dec585832af943720715c2 Mon Sep 17 00:00:00 2001 From: Matteo Cargnelutti Date: Tue, 9 Jul 2024 16:44:01 -0400 Subject: [PATCH 2/3] Typo --- Scoop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scoop.js b/Scoop.js index cf35d78..96e47e5 100644 --- a/Scoop.js +++ b/Scoop.js @@ -607,7 +607,7 @@ export class Scoop { userAgent, // NOTE: // This is a temporary workaround. - // Most browsers' now accepts zstd, but most of the web archiving stack (indexing, playback ...) is not ready to handle it yet. + // Most browsers' now accept zstd, but part of the web archiving stack (indexing, playback ...) is not fully ready to handle it yet. // This line wants to be removed once the ecosystem is ready for zstd. // More on zstd: https://datatracker.ietf.org/doc/html/rfc8878 // TODO: Remove whenever possible. From 6b64465eaa3f921fa4fbe4dd064e0bc324d3ddd1 Mon Sep 17 00:00:00 2001 From: Matteo Cargnelutti Date: Tue, 9 Jul 2024 16:44:19 -0400 Subject: [PATCH 3/3] Typo --- Scoop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scoop.js b/Scoop.js index 96e47e5..3b79006 100644 --- a/Scoop.js +++ b/Scoop.js @@ -607,7 +607,7 @@ export class Scoop { userAgent, // NOTE: // This is a temporary workaround. - // Most browsers' now accept zstd, but part of the web archiving stack (indexing, playback ...) is not fully ready to handle it yet. + // Most browsers now accept zstd, but part of the web archiving stack (indexing, playback ...) is not fully ready to handle it yet. // This line wants to be removed once the ecosystem is ready for zstd. // More on zstd: https://datatracker.ietf.org/doc/html/rfc8878 // TODO: Remove whenever possible.