From ad9a56a4202946b24b0b3d60816197ee036a7f67 Mon Sep 17 00:00:00 2001 From: Ethan Ruszanowski Date: Thu, 1 Feb 2024 16:08:01 -0500 Subject: [PATCH] Handle YouTube shorts. --- bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot.py b/bot.py index 81b3dd2..6a863d4 100644 --- a/bot.py +++ b/bot.py @@ -52,6 +52,8 @@ async def get_youtube_id(url: str, ignore_playlist=True) -> str: return query.path.split('/')[2] if query.path[:3] == '/v/': return query.path.split('/')[2] + if query.path[:8] == '/shorts/': + return query.path.split('/')[1] bot.run(DISCORD_TOKEN)