From 3de8d30765b6f3402a4cd624826ca98ec5335cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 29 Sep 2025 08:58:07 +0200 Subject: [PATCH] [zerochan] normalize "No results" output message (#8313) catch and handle '404 Not Found' responses --- gallery_dl/extractor/zerochan.py | 34 ++++++++++++++++++++++++-------- test/results/zerochan.py | 23 +++++++++++++++++++++ 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/gallery_dl/extractor/zerochan.py b/gallery_dl/extractor/zerochan.py index d3352c03..98c93315 100644 --- a/gallery_dl/extractor/zerochan.py +++ b/gallery_dl/extractor/zerochan.py @@ -193,7 +193,13 @@ class ZerochanTagExtractor(ZerochanExtractor): metadata = self.config("metadata") while True: - page = self.request(url, params=params, expected=(500,)).text + try: + page = self.request( + url, params=params, expected=(500,)).text + except exception.HttpError as exc: + if exc.status == 404: + return + raise thumbs = text.extr(page, '