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

Commit

Permalink
adjust read_urls_as_txt handler
Browse files Browse the repository at this point in the history
  • Loading branch information
glomatico committed Aug 27, 2024
1 parent 96aa043 commit 9ac238f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spotify_web_downloader/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"')
Expand Down

0 comments on commit 9ac238f

Please sign in to comment.