diff --git a/ubot/modules/reddit.py b/ubot/modules/reddit.py index 0ecb86a..2c878c3 100644 --- a/ubot/modules/reddit.py +++ b/ubot/modules/reddit.py @@ -62,15 +62,10 @@ async def imagefetcher(event, sub): except AttributeError: continue - if post.url: - if post.url.endswith(VALID_ENDS): - image_url = post.url - title = post.title - break - elif "v.redd.it" in post.url: - image_url = post.media['reddit_video']['fallback_url'].split("?")[0] - title = post.title - break + if post.url and post.url.endswith(VALID_ENDS): + image_url = post.url + title = post.title + break if not image_url: await event.reply(f"`Failed to find any valid content on `**r/{sub}**`!`")