From 35eddaa94e6f0580f0173bb85bbe096c190400f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 14 Sep 2022 16:14:42 +0200 Subject: [PATCH] [reddit] prevent exception with empty submission URLs (#2913) --- gallery_dl/extractor/reddit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/reddit.py b/gallery_dl/extractor/reddit.py index d35e24e3..954a84f5 100644 --- a/gallery_dl/extractor/reddit.py +++ b/gallery_dl/extractor/reddit.py @@ -46,10 +46,10 @@ class RedditExtractor(Extractor): submission["created_utc"]) yield Message.Directory, submission visited.add(submission["id"]) - url = submission["url"] submission["num"] = 0 - if url.startswith("https://i.redd.it/"): + url = submission["url"] + if url and url.startswith("https://i.redd.it/"): text.nameext_from_url(url, submission) yield Message.Url, url, submission