Skip to content

Commit

Permalink
[zerochan] handle "KeyError - 'items'" (#5826)
Browse files Browse the repository at this point in the history
Zerochan sometimes sends an empty response when there are no more
accessible posts to be had.
  • Loading branch information
mikf committed Jul 5, 2024
1 parent a434fc7 commit b376fa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gallery_dl/extractor/zerochan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b376fa8

Please sign in to comment.