Skip to content

Bulk asynchronous downloader for multiple file hosts

Add check for URL not being URL

Jules-WinnfieldX8da680b10247
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index 4682e6132..af29f3407 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "5.0.3"
+__version__ = "5.0.4"
diff --git a/cyberdrop_dl/scraper/scraper.py b/cyberdrop_dl/scraper/scraper.py
index 669eb4894..ec155ef4f 100644
--- a/cyberdrop_dl/scraper/scraper.py
+++ b/cyberdrop_dl/scraper/scraper.py
@@ -324,7 +324,16 @@ class ScrapeMapper:
if not scrape_item.url:
continue
- if not scrape_item.url.host:
+ if not isinstance(scrape_item.url, URL):
+ try:
+ scrape_item.url = URL(scrape_item.url)
+ except Exception as e:
+ continue
+
+ try:
+ if not scrape_item.url.host:
+ continue
+ except Exception as e:
continue
skip = False
diff --git a/pyproject.toml b/pyproject.toml
index 4f7cded3c..230f87cd5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
-version = "5.0.3"
+version = "5.0.4"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"