[reddit] fix wrong previews (#4649)

caused by a failed comment URL
using the main submission's preview as fallback

14af15bd
4963bb9b
pull/4667/head
Mike Fährmann 12 months ago
parent 08bdde5aac
commit 8bb7243c10
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -125,7 +125,8 @@ class RedditExtractor(Extractor):
if match:
extra.append(match.group(1))
elif not match_user(url) and not match_subreddit(url):
if previews and "preview" in data:
if previews and "comment" not in data and \
"preview" in data:
data["_fallback"] = self._previews(data)
yield Message.Queue, text.unescape(url), data
if "_fallback" in data:

Loading…
Cancel
Save