Merge pull request #1 from ethanrusz/handle-shorts

Add YouTube Shorts Support
This commit is contained in:
Em (Ethan) Ruszanowski 2024-02-01 15:12:07 -06:00 committed by GitHub
commit 9eab74f47a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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)