Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
Try dealing with some unknown errors.
Jules-WinnfieldXb21f2c154431
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.pyindex 792435268..d0985fc24 100644--- a/cyberdrop_dl/__init__.py+++ b/cyberdrop_dl/__init__.py@@ -1 +1 @@-__version__ = "5.0.111"+__version__ = "5.0.112"diff --git a/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py b/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.pyindex 68f2a588a..1dce34cbf 100644--- a/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py+++ b/cyberdrop_dl/scraper/crawlers/jpgchurch_crawler.py@@ -10,20 +10,12 @@ from yarl import URLfrom cyberdrop_dl.scraper.crawler import Crawlerfrom cyberdrop_dl.utils.dataclasses.url_objects import ScrapeItem-from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_ext+from cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_ext, FILE_FORMATSif 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")@@ -36,7 +28,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 check_direct_link(scrape_item.url):+ if await self.check_direct_link(scrape_item.url) or scrape_item.url.suffix in FILE_FORMATS['Images']:await self.handle_direct_link(scrape_item)else:scrape_item.url = self.primary_base_domain / scrape_item.url.path[1:]@@ -143,3 +135,10 @@ 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 Truediff --git a/pyproject.toml b/pyproject.tomlindex 6e7ab2eef..11bef62d3 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[tool.poetry]name = "cyberdrop-dl"-version = "5.0.111"+version = "5.0.112"description = "Bulk downloader for multiple file hosts"authors = ["Jules Winnfield <[email protected]>"]readme = "README.md"