[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://scrolller.com/"""
from .common import Extractor, Message
from .. import text, util, exception
from .. import text, util
from ..cache import cache
BASE_PATTERN = r"(?:https?://)?(?:www\.)?scrolller\.com"
@@ -82,9 +82,9 @@ class ScrolllerExtractor(Extractor):
try:
data = self._request_graphql("LoginQuery", variables, False)
except exception.HttpError as exc:
except self.exc.HttpError as exc:
if exc.status == 403:
raise exception.AuthenticationError()
raise self.exc.AuthenticationError()
raise
return data["login"]["token"]
@@ -206,7 +206,7 @@ class ScrolllerFollowingExtractor(ScrolllerExtractor):
self.login()
if not self.auth_token:
raise exception.AuthorizationError("Login required")
raise self.exc.AuthorizationError("Login required")
variables = {
"iterator": None,