From 8b6bc54e9530ad2ec1ef37846fd1debf48693c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 12 Jun 2025 21:16:34 +0200 Subject: [PATCH] [dl:http] add MIME type and signature for .html files --- gallery_dl/downloader/http.py | 9 +++++++++ test/test_downloader.py | 1 + 2 files changed, 10 insertions(+) diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 87ca71ba..bcff22af 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -469,12 +469,19 @@ MIME_TYPES = { "application/x-pdf": "pdf", "application/x-shockwave-flash": "swf", + "text/html": "html", + "application/ogg": "ogg", # https://www.iana.org/assignments/media-types/model/obj "model/obj": "obj", "application/octet-stream": "bin", } + +def _signature_html(s): + return b"..."), ("ico" , b"\x00\x00\x01\x00"), ("cur" , b"\x00\x00\x02\x00"), ("psd" , b"8BPS"),