From dddfb66f566c8f7bca174b0259af69f4ae1f31c6 Mon Sep 17 00:00:00 2001 From: Jules-WinnfieldX Date: Mon, 8 Apr 2024 11:39:15 -0600 Subject: [PATCH] add password failure --- cyberdrop_dl/scraper/crawlers/gofile_crawler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cyberdrop_dl/scraper/crawlers/gofile_crawler.py b/cyberdrop_dl/scraper/crawlers/gofile_crawler.py index 3edcef451..2309ae7d7 100644 --- a/cyberdrop_dl/scraper/crawlers/gofile_crawler.py +++ b/cyberdrop_dl/scraper/crawlers/gofile_crawler.py @@ -8,7 +8,7 @@ from aiolimiter import AsyncLimiter from yarl import URL -from cyberdrop_dl.clients.errors import ScrapeFailure, DownloadFailure +from cyberdrop_dl.clients.errors import ScrapeFailure, DownloadFailure, PasswordProtected 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 @@ -61,6 +61,10 @@ async def album(self, scrape_item: ScrapeItem) -> None: raise ScrapeFailure(e.status, e.message) JSON_Resp = JSON_Resp['data'] + + if "password" in JSON_Resp: + raise PasswordProtected() + title = await self.create_title(JSON_Resp["name"], content_id, None) contents = JSON_Resp["children"]