From 65587b01bbad381b1b81202720df3a95e84e0653 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Mon, 4 May 2026 13:28:18 +0000 Subject: [PATCH] Fix wombatSetup configuration For some reason, these changes have been made in warc2zim after preparation of the move to python-scraperlib of rewriting logic and we failed to backport them in python-scraperlib in due time --- javascript/src/wombatSetup.js | 17 ++++++++++++----- javascript/test/wombatSetup.js | 4 ++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/javascript/src/wombatSetup.js b/javascript/src/wombatSetup.js index d3511db3..d14761ec 100644 --- a/javascript/src/wombatSetup.js +++ b/javascript/src/wombatSetup.js @@ -292,14 +292,21 @@ export function getWombatInfo( // The host of the original url wombat_host: orig_host, - // Extra options ? - wombat_opts: {}, + // We are not running inside a service worker, wombat needs to know about it since + // some "magic" URLs like blobs are not available + isSW: false, - // ? - enable_auto_fetch: true, + // Convert all post request to get request convert_post_to_get: true, + + // Not used, we are not replaying in a frame target_frame: '___wb_replay_top_frame', - isSW: true, + + // Not used, we are not running in live mode + enable_auto_fetch: false, + + // Extra options, not used + wombat_opts: {}, }; } diff --git a/javascript/test/wombatSetup.js b/javascript/test/wombatSetup.js index 444d0428..3fc889df 100644 --- a/javascript/test/wombatSetup.js +++ b/javascript/test/wombatSetup.js @@ -21,8 +21,8 @@ test('nominalWbInfo', (t) => { ); t.is(wmInfo.coll, ''); t.is(wmInfo.convert_post_to_get, true); - t.is(wmInfo.enable_auto_fetch, true); - t.is(wmInfo.isSW, true); + t.is(wmInfo.enable_auto_fetch, false); + t.is(wmInfo.isSW, false); t.is(wmInfo.is_framed, false); t.is(wmInfo.is_live, false); t.is(wmInfo.mod, '');