mirror of
https://github.com/Nick80835/microbot
synced 2025-08-29 13:38:55 +00:00
remove vreddit support
This commit is contained in:
parent
e146744685
commit
d588cf1d06
@ -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}**`!`")
|
||||
|
Loading…
x
Reference in New Issue
Block a user