Skip to content

Bulk asynchronous downloader for multiple file hosts

fix: saint crawler (#538)

Jacob37845370b34c
diff --git a/cyberdrop_dl/scraper/crawlers/saint_crawler.py b/cyberdrop_dl/scraper/crawlers/saint_crawler.py
index a85088613..e1990c8f9 100644
--- a/cyberdrop_dl/scraper/crawlers/saint_crawler.py
+++ b/cyberdrop_dl/scraper/crawlers/saint_crawler.py
@@ -103,5 +103,7 @@ class SaintCrawler(Crawler):
def get_url_from_base64(link: URL) -> URL:
base64_str: str = link.query.get("file")
+ if not base64_str:
+ return link
filename_decoded = base64.b64decode(base64_str).decode("utf-8")
return URL("https://some_cdn.saint2.cr/videos").with_host(link.host) / filename_decoded
diff --git a/cyberdrop_dl/ui/progress/statistic_progress.py b/cyberdrop_dl/ui/progress/statistic_progress.py
index 209fe8357..4ac3e90c9 100644
--- a/cyberdrop_dl/ui/progress/statistic_progress.py
+++ b/cyberdrop_dl/ui/progress/statistic_progress.py
@@ -32,8 +32,9 @@ class UiFailureTotal(NamedTuple):
@classmethod
def from_pair(cls, full_msg: str, count: int) -> UiFailureTotal:
- error_code, msg = full_msg.split(" ", 1)
- if error_code.isdigit():
+ parts = full_msg.split(" ", 1)
+ if len(parts) > 1 and parts[0].isdigit:
+ error_code, msg = parts
return cls(full_msg, count, int(error_code), msg)
return cls(full_msg, count, None, full_msg)