From b376fa814e2c8562c12a81bb8a2afef64295138c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 5 Jul 2024 02:54:56 +0200 Subject: [PATCH] [zerochan] handle "KeyError - 'items'" (#5826) Zerochan sometimes sends an empty response when there are no more accessible posts to be had. --- gallery_dl/extractor/zerochan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/zerochan.py b/gallery_dl/extractor/zerochan.py index fc61dffc87..1bd62993c3 100644 --- a/gallery_dl/extractor/zerochan.py +++ b/gallery_dl/extractor/zerochan.py @@ -183,7 +183,8 @@ def posts_api(self): data = self.request(url, params=params).json() try: posts = data["items"] - except ValueError: + except Exception: + self.log.debug("Server response: %s", data) return if metadata: