Skip to content

Bulk asynchronous downloader for multiple file hosts

fix commenting out url

Jules-WinnfieldX3d36a5fe72fc
diff --git a/README.md b/README.md
index a1254c700..8d7a495c1 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 3.6.33
+The latest version of the program is 3.6.34
<a href="https://www.buymeacoffee.com/juleswinnft" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index 6c56f8503..cbaa62bf8 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "3.6.33"
+__version__ = "3.6.34"
diff --git a/cyberdrop_dl/base_functions/base_functions.py b/cyberdrop_dl/base_functions/base_functions.py
index 99f813904..3156cc501 100644
--- a/cyberdrop_dl/base_functions/base_functions.py
+++ b/cyberdrop_dl/base_functions/base_functions.py
@@ -87,14 +87,15 @@ async def purge_dir(dirname, in_place=True):
async def regex_links(urls) -> list:
- if urls.lstrip().startswith('#'):
- return []
-
- all_links = [x.group().replace(".md.", ".") for x in re.finditer(
- r"(?:http.*?)(?=($|\n|\r\n|\r|\s|\"|\[/URL]|]\[|\[/img]))", urls)]
yarl_links = []
- for link in all_links:
- yarl_links.append(URL(link))
+ for line in urls:
+ if line.lstrip().startswith('#'):
+ continue
+
+ all_links = [x.group().replace(".md.", ".") for x in re.finditer(
+ r"(?:http.*?)(?=($|\n|\r\n|\r|\s|\"|\[/URL]|]\[|\[/img]))", line)]
+ for link in all_links:
+ yarl_links.append(URL(link))
return yarl_links
diff --git a/cyberdrop_dl/main.py b/cyberdrop_dl/main.py
index a7bd6deff..646c96932 100644
--- a/cyberdrop_dl/main.py
+++ b/cyberdrop_dl/main.py
@@ -121,7 +121,7 @@ async def download_all(auth_args: Dict, file_args: Dict, jdownloader_args: Dict,
if await content_object.is_empty():
logging.error('ValueError No links')
- await log("No links found duing scraping, check passwords or that the urls are accessible", Fore.RED)
+ await log("No links found during scraping, check passwords or that the urls are accessible", Fore.RED)
await log("This program does not currently support password protected albums.", Fore.RED)
exit(0)
await clear()
@@ -161,7 +161,7 @@ async def director(args: argparse.Namespace):
links = list(map(URL, links))
with open(input_file, "r", encoding="utf8") as f:
- links += await regex_links(f.read())
+ links += await regex_links([line.rstrip() for line in f])
links = list(filter(None, links))
if not links: