Handle YouTube shorts.

This commit is contained in:
Em (Ethan) Ruszanowski 2024-02-01 16:08:01 -05:00
parent 08557106b4
commit ad9a56a420
Signed by: em
GPG key ID: C725D6E571252B96

2
bot.py
View file

@ -52,6 +52,8 @@ async def get_youtube_id(url: str, ignore_playlist=True) -> str:
return query.path.split('/')[2] return query.path.split('/')[2]
if query.path[:3] == '/v/': if query.path[:3] == '/v/':
return query.path.split('/')[2] return query.path.split('/')[2]
if query.path[:8] == '/shorts/':
return query.path.split('/')[1]
bot.run(DISCORD_TOKEN) bot.run(DISCORD_TOKEN)