diff options
| author | 2021-06-05 20:55:36 -0400 | |
|---|---|---|
| committer | 2021-06-05 20:55:36 -0400 | |
| commit | 8a644b7a06c504263a478d3681eed10b4161b5be (patch) | |
| tree | b3d668588e5c0be8c75467e50499f73ff9ec7c05 /gallery_dl/extractor/sankaku.py | |
| parent | e7eb1f9779f2e223575ab23a6bc1abf2222e7d27 (diff) | |
New upstream version 1.17.5.upstream/1.17.5
Diffstat (limited to 'gallery_dl/extractor/sankaku.py')
| -rw-r--r-- | gallery_dl/extractor/sankaku.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gallery_dl/extractor/sankaku.py b/gallery_dl/extractor/sankaku.py index 5579017..9808cb8 100644 --- a/gallery_dl/extractor/sankaku.py +++ b/gallery_dl/extractor/sankaku.py @@ -10,7 +10,7 @@ from .booru import BooruExtractor from .common import Message -from .. import text, exception +from .. import text, util, exception from ..cache import cache import collections @@ -206,7 +206,7 @@ class SankakuAPI(): self.username, self.password = self.extractor._get_auth_info() if not self.username: - self.authenticate = lambda: None + self.authenticate = util.noop def pools(self, pool_id): params = {"lang": "en"} @@ -250,7 +250,8 @@ class SankakuAPI(): success = True if not success: code = data.get("code") - if code and code.endswith(("invalid-token", "invalid_token")): + if code and code.endswith( + ("unauthorized", "invalid-token", "invalid_token")): _authenticate_impl.invalidate(self.username) continue raise exception.StopExtraction(code) |
