diff --git a/spotify_web_downloader/cli.py b/spotify_web_downloader/cli.py index 820fff9..cbed099 100644 --- a/spotify_web_downloader/cli.py +++ b/spotify_web_downloader/cli.py @@ -402,7 +402,11 @@ def main( return error_count = 0 if read_urls_as_txt: - urls = [url.strip() for url in Path(urls[0]).read_text().splitlines()] + _urls = [] + for url in urls: + if Path(url).exists(): + _urls.extend(Path(url).read_text(encoding="utf-8").splitlines()) + urls = _urls for url_index, url in enumerate(urls, start=1): url_progress = f"URL {url_index}/{len(urls)}" logger.info(f'({url_progress}) Checking "{url}"')