rename 'StopExtraction' to 'AbortExtraction'

for cases where StopExtraction was used to report errors
This commit is contained in:
Mike Fährmann
2025-07-09 21:07:28 +02:00
parent f17ed0569a
commit d8ef1d693f
57 changed files with 149 additions and 156 deletions

View File

@@ -219,17 +219,16 @@ class FacebookExtractor(Extractor):
res = self.request(url, **kwargs)
if res.url.startswith(self.root + "/login"):
raise exception.AuthenticationError(
"You must be logged in to continue viewing images." +
LEFT_OFF_TXT
raise exception.LoginRequires(
f"You must be logged in to continue viewing images."
f"{LEFT_OFF_TXT}"
)
if b'{"__dr":"CometErrorRoot.react"}' in res.content:
raise exception.StopExtraction(
"You've been temporarily blocked from viewing images. "
"\nPlease try using a different account, "
"using a VPN or waiting before you retry." +
LEFT_OFF_TXT
raise exception.AbortExtraction(
f"You've been temporarily blocked from viewing images.\n"
f"Please try using a different account, "
f"using a VPN or waiting before you retry.{LEFT_OFF_TXT}"
)
return res