[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

@@ -7,7 +7,7 @@
"""Extractors for https://www.lofter.com/"""
from .common import Extractor, Message
from .. import text, util, exception
from .. import text, util
class LofterExtractor(Extractor):
@@ -132,11 +132,11 @@ class LofterAPI():
info = response.json()
if info["meta"]["status"] == 4200:
raise exception.NotFoundError("blog")
raise self.exc.NotFoundError("blog")
if info["meta"]["status"] != 200:
self.extractor.log.debug("Server response: %s", info)
raise exception.AbortExtraction("API request failed")
raise self.exc.AbortExtraction("API request failed")
return info["response"]