mirror of
https://github.com/Nick80835/microbot
synced 2025-08-29 05:29:16 +00:00
support vreddit without audio for now
This commit is contained in:
parent
b2fee49f01
commit
1d0bae96f2
@ -64,6 +64,10 @@ async def imagefetcher(event, sub):
|
||||
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 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