Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
feat: support expired contect (Imagepond)
NTFSvolumec589eaef9241
diff --git a/cyberdrop_dl/crawlers/imagepond.py b/cyberdrop_dl/crawlers/imagepond.pyindex f4746324d..faabeb5a4 100644--- a/cyberdrop_dl/crawlers/imagepond.py+++ b/cyberdrop_dl/crawlers/imagepond.py@@ -6,6 +6,7 @@ from typing import TYPE_CHECKING, ClassVar, Self, finalfrom cyberdrop_dl import aiofrom cyberdrop_dl.clients.http import HTTPConfigfrom cyberdrop_dl.crawlers.crawler import Crawler, URLConfig+from cyberdrop_dl.exceptions import ScrapeErrorfrom cyberdrop_dl.url_objects import AbsoluteHttpURLfrom cyberdrop_dl.utils import css, open_graphfrom cyberdrop_dl.utils.errors import error_handling_wrapper@@ -25,6 +26,7 @@ class Selector:ARCHIVE = "[x-data='archiveViewer()']"DIRECT_DL = "#embed-direct"EMBED = ".embed-link a[href]"+ EXPIRED = "h1:-soup-contains-own('Content Expired')"@dataclasses.dataclass(slots=True)@@ -120,6 +122,13 @@ class ImagePondCrawler(Crawler):soup = await resp.soup()+ if soup.select_one(Selector.EXPIRED):+ redirect = await self.request_redirect(resp.url / "thumb/300")+ if "thumb" in redirect.parts or redirect.name.startswith("thumb_") or not self.is_subdomain(redirect):+ raise ScrapeError(404, "Content Expired")+ await self.direct_file(scrape_item, redirect)+ return+try:file = File.parse(soup)except (css.SelectorError, open_graph.OpenGraphError):