From f87cfa5f6693cf9543e3e395058c6a6b8666e80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 16 Nov 2022 21:45:26 +0100 Subject: [PATCH] [downloader:http] add signature check for .mp4 files --- gallery_dl/downloader/http.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gallery_dl/downloader/http.py b/gallery_dl/downloader/http.py index fe896cd2..26eb7b5f 100644 --- a/gallery_dl/downloader/http.py +++ b/gallery_dl/downloader/http.py @@ -390,11 +390,13 @@ SIGNATURE_CHECKS = { "bmp" : lambda s: s[0:2] == b"BM", "webp": lambda s: (s[0:4] == b"RIFF" and s[8:12] == b"WEBP"), - "avif": lambda s: s[4:12] == b"ftypavif", + "avif": lambda s: s[4:11] == b"ftypavi" and s[11] in b"fs", "svg" : lambda s: s[0:5] == b"