gallery-dl icon indicating copy to clipboard operation
gallery-dl copied to clipboard

[mastodon] Warn about a moved account

Open AlttiRi opened this issue 1 year ago • 1 comments

A moved account's JSON looks like this:

"account": {
  "acct": "OldName",
  "moved": {
    "acct": "NewAccName"
  }
}

I would like if gallery-dl will warn if an account is moved, since new posts will be posted on the new account. Or just automatically follow to the new account and download it too.

Since I just use a list of URL with --input-file option without visiting the profiles in a web browser, I can't know if someone has moved to a new page, so I just miss the new content posted after the profile moving.


An account can move to another mastodon instance also:

  "moved": {
    "acct": "[email protected]",
  }

An example I found: https://mastodon.social/@body -> https://glaceon.social/@argr

AlttiRi avatar Sep 19 '22 23:09 AlttiRi

Implemented a simple warning message for now (https://github.com/mikf/gallery-dl/commit/2787c8511a29087144923eebe97a2f1a230fd1d8)

$ gallery-dl https://mastodon.social/@body
[mastodon.social][warning] Account 'body' moved to '[email protected]'
/tmp/mastodon/mastodon.social/body/mast…06812754755699210_106812750412766707.png
...

Automatically downloading from the new account might not be possible since it needs an access_token for the potentially new mastodon instance to get the new user ID.

The id in the moved section is not the one needed, otherwise this could work without said access token. (should be 124392)

"moved":{"id":"106818876077774066"}

mikf avatar Sep 20 '22 16:09 mikf