[common] add reference to 'exception' module to Extractor class

- remove 'exception' imports
- replace with 'self.exc'
This commit is contained in:
Mike Fährmann
2026-02-14 21:29:26 +01:00
parent b552cdba04
commit 53cdfaac37
100 changed files with 382 additions and 382 deletions

View File

@@ -9,7 +9,7 @@
"""Extractors for https://www.behance.net/"""
from .common import Extractor, Message
from .. import text, util, exception
from .. import text, util
class BehanceExtractor(Extractor):
@@ -139,13 +139,13 @@ class BehanceGalleryExtractor(BehanceExtractor):
if not data["modules"]:
access = data.get("matureAccess")
if access == "logged-out":
raise exception.AuthorizationError(
raise self.exc.AuthorizationError(
"Mature content galleries require logged-in cookies")
if access == "restricted-safe":
raise exception.AuthorizationError(
raise self.exc.AuthorizationError(
"Mature content blocked in account settings")
if access and access != "allowed":
raise exception.AuthorizationError()
raise self.exc.AuthorizationError()
return ()
results = []