mirror of
https://github.com/Nick80835/microbot
synced 2025-08-31 14:38:04 +00:00
remove vreddit support
This commit is contained in:
@@ -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}**`!`")
|
||||
|
Reference in New Issue
Block a user