Skip to content

Bulk asynchronous downloader for multiple file hosts

fix saint 404

Jules-WinnfieldX891da993f611
diff --git a/cyberdrop_dl/scraper/crawlers/saint_crawler.py b/cyberdrop_dl/scraper/crawlers/saint_crawler.py
index 21e76c747..29c16183c 100644
--- a/cyberdrop_dl/scraper/crawlers/saint_crawler.py
+++ b/cyberdrop_dl/scraper/crawlers/saint_crawler.py
@@ -5,6 +5,7 @@ from typing import TYPE_CHECKING
from aiolimiter import AsyncLimiter
from yarl import URL
+from cyberdrop_dl.clients.errors import ScrapeFailure
from cyberdrop_dl.scraper.crawler import Crawler
from cyberdrop_dl.utils.dataclasses.url_objects import ScrapeItem
from cyberdrop_dl.utils.utilities import get_filename_and_ext, error_handling_wrapper
@@ -38,7 +39,9 @@ class SaintCrawler(Crawler):
async with self.request_limiter:
soup = await self.client.get_BS4(self.domain, scrape_item.url)
-
- link = URL(soup.select_one('video[id=main-video] source').get('src'))
+ try:
+ link = URL(soup.select_one('video[id=main-video] source').get('src'))
+ except AttributeError:
+ raise ScrapeFailure(404, f"Could not find video source for {scrape_item.url}")
filename, ext = await get_filename_and_ext(link.name)
await self.handle_file(link, scrape_item, filename, ext)