1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 03:02:50 +01:00

[reddit] prevent exception with empty submission URLs (#2913)

This commit is contained in:
Mike Fährmann 2022-09-14 16:14:42 +02:00
parent 464ea90d14
commit 35eddaa94e
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -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