2
0
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:
Nick80835 2020-04-05 16:08:31 -04:00
parent b2fee49f01
commit 1d0bae96f2

View File

@ -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}**`!`")