Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
add password failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Apr 8, 2024
1 parent 9d474f2 commit dddfb66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cyberdrop_dl/scraper/crawlers/gofile_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit dddfb66

Please sign in to comment.