mirror of
https://github.com/ethanrusz/youtube-url-corrector.git
synced 2024-11-22 01:47:47 -05:00
Correct typo
This commit is contained in:
parent
21fff236be
commit
dc84305937
1 changed files with 1 additions and 2 deletions
3
bot.py
3
bot.py
|
@ -37,8 +37,7 @@ async def on_message(message):
|
||||||
|
|
||||||
async def get_youtube_id(url: str, ignore_playlist=True) -> str:
|
async def get_youtube_id(url: str, ignore_playlist=True) -> str:
|
||||||
query = urlparse(url)
|
query = urlparse(url)
|
||||||
if query.hostname == 'youtu.be':
|
if query.hostname == 'youtu.be': return query.path[1:]
|
||||||
return query.path[1:]
|
|
||||||
if query.hostname in {'www.youtube.com', 'youtube.com', 'music.youtube.com'}:
|
if query.hostname in {'www.youtube.com', 'youtube.com', 'music.youtube.com'}:
|
||||||
if not ignore_playlist:
|
if not ignore_playlist:
|
||||||
# use case: get playlist id not current video in playlist
|
# use case: get playlist id not current video in playlist
|
||||||
|
|
Loading…
Reference in a new issue