From f67b99a7b4eedbd484166c3d1d1e7ec1c97d30ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 10 Feb 2026 18:23:15 +0100 Subject: [PATCH] [reddit] fix "KeyError: 'children'" when expanding comments (#9037) --- gallery_dl/extractor/reddit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/reddit.py b/gallery_dl/extractor/reddit.py index 23f7d43f..4979442d 100644 --- a/gallery_dl/extractor/reddit.py +++ b/gallery_dl/extractor/reddit.py @@ -484,7 +484,8 @@ class RedditAPI(): data = self._call(endpoint, params)["json"] for thing in data["data"]["things"]: if thing["kind"] == "more": - children.extend(thing["data"]["children"]) + if more := thing["data"].get("children"): + children.extend(more) else: yield thing["data"]