Skip to content

Bulk asynchronous downloader for multiple file hosts

add weird edge case for imgbox edit links

Jules-WinnfieldX7a08d276540c
diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py
index 4390bd9bb..f2b607bf0 100644
--- a/cyberdrop_dl/__init__.py
+++ b/cyberdrop_dl/__init__.py
@@ -1 +1 @@
-__version__ = "5.2.41"
+__version__ = "5.2.42"
diff --git a/cyberdrop_dl/scraper/crawlers/imgbox_crawler.py b/cyberdrop_dl/scraper/crawlers/imgbox_crawler.py
index f0b2fa7a7..bd999aef6 100644
--- a/cyberdrop_dl/scraper/crawlers/imgbox_crawler.py
+++ b/cyberdrop_dl/scraper/crawlers/imgbox_crawler.py
@@ -18,6 +18,7 @@ if TYPE_CHECKING:
class ImgBoxCrawler(Crawler):
def __init__(self, manager: Manager):
super().__init__(manager, "imgbox", "ImgBox")
+ self.primary_base_domain = URL("https://imgbox.com")
self.request_limiter = AsyncLimiter(10, 1)
"""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"""
@@ -27,7 +28,10 @@ class ImgBoxCrawler(Crawler):
task_id = await self.scraping_progress.add_task(scrape_item.url)
if "t" in scrape_item.url.host or "_" in scrape_item.url.name:
- scrape_item.url = URL("https://imgbox.com") / scrape_item.url.name.split("_")[0]
+ scrape_item.url = self.primary_base_domain / scrape_item.url.name.split("_")[0]
+
+ if "gallery/edit" in str(scrape_item.url):
+ scrape_item.url = self.primary_base_domain / "g" / scrape_item.url.parts[-2]
if "g" in scrape_item.url.parts:
await self.album(scrape_item)
diff --git a/pyproject.toml b/pyproject.toml
index 854938ea9..ad9a4ff90 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
-version = "5.2.41"
+version = "5.2.42"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"