Skip to content

Commit 40f6f7a

Browse files
authored
Fix custom yt-url parsing (spotDL#1411)
1 parent faf1702 commit 40f6f7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spotdl/parsers/query_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ def parse_request(
4949
) -> List[SongObject]:
5050
song_list: List[SongObject] = []
5151
if (
52-
"youtube.com/watch?v=" in request
52+
("youtube.com/watch?v=" in request or "youtu.be/" in request)
5353
and "open.spotify.com" in request
5454
and "track" in request
5555
and "|" in request
5656
):
5757
urls = request.split("|")
5858

59-
if len(urls) <= 1 or "youtube" not in urls[0] or "spotify" not in urls[1]:
59+
if len(urls) <= 1 or "youtu" not in urls[0] or "spotify" not in urls[1]:
6060
print("Incorrect format used, please use YouTubeURL|SpotifyURL")
6161
else:
6262
print("Fetching YouTube video with spotify metadata")

0 commit comments

Comments
 (0)