From 476d563ec22e568ce77d4eaa3c452b71b2e3ed7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 11 Dec 2020 14:21:04 +0100 Subject: [PATCH] [downloader:http] add MIME type and signature for .swf files --- gallery_dl/downloader/http.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index 63e2c562..b8546a88 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -308,6 +308,7 @@ MIME_TYPES = { "application/pdf" : "pdf", "application/x-pdf": "pdf", + "application/x-shockwave-flash": "swf", "application/ogg": "ogg", "application/octet-stream": "bin", @@ -330,6 +331,7 @@ FILE_SIGNATURES = { "rar" : b"\x52\x61\x72\x21\x1A\x07", "7z" : b"\x37\x7A\xBC\xAF\x27\x1C", "pdf" : b"%PDF-", + "swf" : (b"CWS", b"FWS"), # check 'bin' files against all other file signatures "bin" : b"\x00\x00\x00\x00", }