From 5c8bea3cc0c74238703f42e68ebd7f65545059d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 2 Feb 2026 10:48:56 +0100 Subject: [PATCH] [8chan] fail downloads of 'POW' images (#8975) --- gallery_dl/extractor/8chan.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gallery_dl/extractor/8chan.py b/gallery_dl/extractor/8chan.py index d0d64dc8..1f477c60 100644 --- a/gallery_dl/extractor/8chan.py +++ b/gallery_dl/extractor/8chan.py @@ -107,6 +107,7 @@ class _8chanThreadExtractor(_8chanExtractor): for num, file in enumerate(files): file.update(thread) file["num"] = num + file["_http_validate"] = _validate text.nameext_from_url(file["originalName"], file) yield Message.Url, self.root + file["path"], file @@ -137,3 +138,12 @@ class _8chanBoardExtractor(_8chanExtractor): return url = f"{self.root}/{board}/{pnum}.json" threads = self.request_json(url)["threads"] + + +def _validate(response): + hget = response.headers.get + return not ( + hget("expires") == "0" and + hget("content-length") == "166" and + hget("content-type") == "image/png" + )