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

Commit

Permalink
Add check for URL not being URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Dec 4, 2023
1 parent 6c98c6e commit 8da680b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cyberdrop_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.0.3"
__version__ = "5.0.4"
11 changes: 10 additions & 1 deletion cyberdrop_dl/scraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,16 @@ async def map_urls(self) -> None:

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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 8da680b

Please sign in to comment.