[exhentai] detect HTML downloads (#4798)

This commit is contained in:
Mike Fährmann
2025-06-07 22:06:53 +02:00
parent 483e30d846
commit 3b75b195c1

View File

@@ -412,7 +412,12 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
def _validate_signature(self, signature):
"""Return False if all file signature bytes are zero"""
if signature:
if signature[0]:
byte = signature[0]
if byte:
# 60 == b"<"
if byte == 60 and b"<!doctype html".startswith(
signature[:14].lower()):
return "HTML response"
return True
for byte in signature:
if byte: