Update formatting

This commit is contained in:
Em (Ethan) Ruszanowski 2024-01-18 23:02:24 -05:00
parent dc84305937
commit 08557106b4
Signed by: em
GPG key ID: C725D6E571252B96

3
bot.py
View file

@ -37,7 +37,8 @@ async def on_message(message):
async def get_youtube_id(url: str, ignore_playlist=True) -> str:
query = urlparse(url)
if query.hostname == 'youtu.be': return query.path[1:]
if query.hostname == 'youtu.be':
return query.path[1:]
if query.hostname in {'www.youtube.com', 'youtube.com', 'music.youtube.com'}:
if not ignore_playlist:
# use case: get playlist id not current video in playlist