From 5d452e17c4b8d85089368f9eb39e3a6c209da254 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Tue, 8 Oct 2024 09:52:38 +0000 Subject: [PATCH] HTML documents can be retrieved as 'fetch' as well (fix #405) --- src/warc2zim/content_rewriting/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/warc2zim/content_rewriting/generic.py b/src/warc2zim/content_rewriting/generic.py index 4f41668..cd13804 100644 --- a/src/warc2zim/content_rewriting/generic.py +++ b/src/warc2zim/content_rewriting/generic.py @@ -154,7 +154,7 @@ def get_rewrite_mode(self, record, mimetype): def get_resourcetype_rewrite_mode(self, record, resourcetype, mimetype): """Get current record rewrite mode based on WARC-Resource-Type and mimetype""" - if resourcetype in ["document", "xhr"] and mimetype == "text/html": + if resourcetype in ["document", "xhr", "fetch"] and mimetype == "text/html": # TODO : Handle header "Accept" == "application/json" if getattr(record, "method", "GET") == "GET": return "html"