Skip to content

Bulk asynchronous downloader for multiple file hosts

fix links arg

Jules-WinnfieldX251e4f273f3f
diff --git a/README.md b/README.md
index 09e6e8601..7cf486cd6 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# `cyberdrop-dl`
**Bulk downloader for multiple file hosts**
-The latest version of the program is 4.0.12
+The latest version of the program is 4.0.13
Brand new and improved! Cyberdrop-DL now has an updated paint job, fantastic new look. On top of this it also downloads from different domains simultaneously.
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index f23f5a236..de917c3e0 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "4.0.12"
+__version__ = "4.0.13"
diff --git a/cyberdrop_dl/main.py b/cyberdrop_dl/main.py
index db2cd455a..dfd9934b3 100644
--- a/cyberdrop_dl/main.py
+++ b/cyberdrop_dl/main.py
@@ -138,8 +138,9 @@ async def file_management(args: dict, links: list) -> None:
async def consolidate_links(args: dict, links: list) -> list:
"""We consolidate links from command line and from URLs.txt into a singular list"""
links = list(map(URL, links))
- with open(args["Files"]["input_file"], "r", encoding="utf8") as f:
- links += await regex_links([line.rstrip() for line in f])
+ if args["Files"]["input_file"].is_file():
+ with open(args["Files"]["input_file"], "r", encoding="utf8") as f:
+ links += await regex_links([line.rstrip() for line in f])
links = list(filter(None, links))
if not links: