mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-18 17:25:22 -04:00
parent
6f03be91e2
commit
d48af5bb01
1 changed files with 8 additions and 2 deletions
|
@ -119,7 +119,13 @@ class MusicDL(list):
|
||||||
:raises InvalidSourceError
|
:raises InvalidSourceError
|
||||||
:raises ParsingError
|
:raises ParsingError
|
||||||
"""
|
"""
|
||||||
url = ' '.join(urls)
|
if isinstance(urls, str):
|
||||||
|
url = urls
|
||||||
|
elif isinstance(urls, tuple):
|
||||||
|
url = " ".join(urls)
|
||||||
|
else:
|
||||||
|
raise Exception(f"Urls has invalid type {type(urls)}")
|
||||||
|
|
||||||
# youtube is handled by youtube-dl, so much of the
|
# youtube is handled by youtube-dl, so much of the
|
||||||
# processing is not necessary
|
# processing is not necessary
|
||||||
youtube_urls = self.youtube_url_parse.findall(url)
|
youtube_urls = self.youtube_url_parse.findall(url)
|
||||||
|
@ -134,7 +140,7 @@ class MusicDL(list):
|
||||||
f"command. See {click.style('rip lastfm --help', fg='yellow')}."
|
f"command. See {click.style('rip lastfm --help', fg='yellow')}."
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
message = url
|
message = f"Cannot find urls in text: {url}"
|
||||||
|
|
||||||
raise ParsingError(message)
|
raise ParsingError(message)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue