diff --git a/src/warc2zim/content_rewriting/generic.py b/src/warc2zim/content_rewriting/generic.py index 04b9c1e..eb2b644 100644 --- a/src/warc2zim/content_rewriting/generic.py +++ b/src/warc2zim/content_rewriting/generic.py @@ -152,7 +152,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 == "document": + if resourcetype == "document" and mimetype == "text/html": # TODO : Handle header "Accept" == "application/json" if getattr(record, "method", "GET") == "GET": return "html"