diff options
| author | 2022-10-03 04:08:41 -0400 | |
|---|---|---|
| committer | 2022-10-03 04:08:41 -0400 | |
| commit | b2d8a54ecf4157570d00a8b974a779766822bf4b (patch) | |
| tree | d7b6db11c9b6add2c1a714fcfc95ab62b11e126c /gallery_dl/extractor/mastodon.py | |
| parent | e6b82556343116256be047ab7099bedd9063f66a (diff) | |
New upstream version 1.23.2upstream/1.23.2
Diffstat (limited to 'gallery_dl/extractor/mastodon.py')
| -rw-r--r-- | gallery_dl/extractor/mastodon.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gallery_dl/extractor/mastodon.py b/gallery_dl/extractor/mastodon.py index 493a8ef..9ce5772 100644 --- a/gallery_dl/extractor/mastodon.py +++ b/gallery_dl/extractor/mastodon.py @@ -31,6 +31,8 @@ class MastodonExtractor(BaseExtractor): def items(self): for status in self.statuses(): + if self._check_move: + self._check_move(status["account"]) if not self.reblogs and status["reblog"]: self.log.debug("Skipping %s (reblog)", status["id"]) continue @@ -56,6 +58,12 @@ class MastodonExtractor(BaseExtractor): """Return an iterable containing all relevant Status objects""" return () + def _check_move(self, account): + self._check_move = None + if "moved" in account: + self.log.warning("Account '%s' moved to '%s'", + account["acct"], account["moved"]["acct"]) + INSTANCES = { "mastodon.social": { @@ -192,6 +200,7 @@ class MastodonAPI(): handle = "@{}@{}".format(username, self.extractor.instance) for account in self.account_search(handle, 1): if account["username"] == username: + self.extractor._check_move(account) return account["id"] raise exception.NotFoundError("account") |
