Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
fix: handle 404 edge case (imgbox) (#167)
NTFSvolume8fd2cf1a112f
diff --git a/cyberdrop_dl/scraper/crawlers/imgbox_crawler.py b/cyberdrop_dl/scraper/crawlers/imgbox_crawler.pyindex 09dd71206..bf39729b0 100644--- a/cyberdrop_dl/scraper/crawlers/imgbox_crawler.py+++ b/cyberdrop_dl/scraper/crawlers/imgbox_crawler.py@@ -8,11 +8,13 @@ from aiolimiter import AsyncLimiterfrom yarl import URLfrom cyberdrop_dl.scraper.crawler import Crawler+from cyberdrop_dl.clients.errors import ScrapeFailurefrom cyberdrop_dl.utils.dataclasses.url_objects import ScrapeItemfrom cyberdrop_dl.utils.utilities import error_handling_wrapper, get_filename_and_extif TYPE_CHECKING:from cyberdrop_dl.managers.manager import Manager+ from bs4 import BeautifulSoupclass ImgBoxCrawler(Crawler):@@ -44,8 +46,11 @@ class ImgBoxCrawler(Crawler):async def album(self, scrape_item: ScrapeItem) -> None:"""Scrapes an album"""async with self.request_limiter:- soup = await self.client.get_BS4(self.domain, scrape_item.url)+ soup: BeautifulSoup = await self.client.get_BS4(self.domain, scrape_item.url)+ if "The specified gallery could not be found" in soup.text:+ raise ScrapeFailure(404, f"Gallery not found: {scrape_item.url}")+scrape_item.album_id = scrape_item.url.parts[2]scrape_item.part_of_album = True