From d588cf1d06d66cca91f09d150ea76d59d781114a Mon Sep 17 00:00:00 2001 From: Nick80835 Date: Mon, 4 May 2020 20:07:43 -0400 Subject: [PATCH] remove vreddit support --- ubot/modules/reddit.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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}**`!`")