Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit 9ac238f

Browse files
committed
adjust read_urls_as_txt handler
1 parent 96aa043 commit 9ac238f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spotify_web_downloader/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,11 @@ def main(
402402
return
403403
error_count = 0
404404
if read_urls_as_txt:
405-
urls = [url.strip() for url in Path(urls[0]).read_text().splitlines()]
405+
_urls = []
406+
for url in urls:
407+
if Path(url).exists():
408+
_urls.extend(Path(url).read_text(encoding="utf-8").splitlines())
409+
urls = _urls
406410
for url_index, url in enumerate(urls, start=1):
407411
url_progress = f"URL {url_index}/{len(urls)}"
408412
logger.info(f'({url_progress}) Checking "{url}"')

0 commit comments

Comments
 (0)