Skip to content

Bulk asynchronous downloader for multiple file hosts

Try dealing with some unknown errors.

Jules-WinnfieldX52d0b1c1cb53
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index b88da56f3..792435268 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "5.0.109"
+__version__ = "5.0.111"
diff --git a/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py b/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py
index 7cba9c0fb..68f2a588a 100644
--- a/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py
+++ b/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py
@@ -16,6 +16,14 @@ if TYPE_CHECKING:
from cyberdrop_dl.managers.manager import Manager
+def check_direct_link(url: URL) -> bool:
+ """Determines if the url is a direct link or not"""
+ cdn_possibilities = r"(?:(jpg.church\/images\/...)|(simp..jpg.church)|(jpg.fish\/images\/...)|(simp..jpg.fish)|(jpg.fishing\/images\/...)|(simp..jpg.fishing))"
+ if not re.match(cdn_possibilities, url.host):
+ return False
+ return True
+
+
class JPGChurchCrawler(Crawler):
def __init__(self, manager: Manager):
super().__init__(manager, "sharex", "JPGChurch")
@@ -28,7 +36,7 @@ class JPGChurchCrawler(Crawler):
"""Determines where to send the scrape item based on the url"""
task_id = await self.scraping_progress.add_task(scrape_item.url)
- if await self.check_direct_link(scrape_item.url):
+ if check_direct_link(scrape_item.url):
await self.handle_direct_link(scrape_item)
else:
scrape_item.url = self.primary_base_domain / scrape_item.url.path[1:]
@@ -135,10 +143,3 @@ class JPGChurchCrawler(Crawler):
"""Parses a datetime string into a unix timestamp"""
date = datetime.datetime.strptime(date, "%Y-%m-%d %H:%M:%S")
return calendar.timegm(date.timetuple())
-
- async def check_direct_link(self, url: URL) -> bool:
- """Determines if the url is a direct link or not"""
- cdn_possibilities = r"(?:(jpg.church\/images\/...)|(simp..jpg.church)|(jpg.fish\/images\/...)|(simp..jpg.fish)|(jpg.fishing\/images\/...)|(simp..jpg.fishing))"
- if not re.match(cdn_possibilities, url.host):
- return False
- return True
diff --git a/pyproject.toml b/pyproject.toml
index 63874d2b1..6e7ab2eef 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
-version = "5.0.109"
+version = "5.0.111"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"