mirror of
https://github.com/ethanrusz/youtube-url-corrector.git
synced 2024-11-22 01:47:47 -05:00
Handle YouTube shorts.
This commit is contained in:
parent
08557106b4
commit
ad9a56a420
1 changed files with 2 additions and 0 deletions
2
bot.py
2
bot.py
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue