Fix YouTube Shorts link conversion

This commit is contained in:
Em (Ethan) Ruszanowski 2024-06-26 19:04:04 -04:00
parent bc9454f79e
commit a5821c096c
Signed by: em
GPG key ID: C725D6E571252B96

2
bot.py
View file

@ -56,7 +56,7 @@ async def get_youtube_id(url: str, ignore_playlist=True) -> str:
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/": if query.path[:8] == "/shorts/":
return query.path.split("/")[1] return query.path.split("/")[2]
bot.run(DISCORD_TOKEN) bot.run(DISCORD_TOKEN)