mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
10.74k stars 883 forks source link

Global mastodon support #3403

Open GiovanH opened 1 year ago

GiovanH commented 1 year ago

I'm aware of existing support of custom mastodon instances (see https://github.com/mikf/gallery-dl/issues/2946#issuecomment-1252851065 ) but it may also be possible to detect URLs as being mastodon urls programmatically.

Specifically, a URL in the form of https://{domain}/@{name}/{long integer id} could be automatically recognized as possibly being a link to a mastodon status, and at least checked as such.

This obviously wouldn't be able to handle authentication or anything else that requires manual configuration, but it would get a lot of urls working right away that currently just break.

mikf commented 1 year ago

but it may also be possible to detect URLs as being mastodon urls programmatically.

Maybe something for the generic extractor, but I don't know. This is not really something gallery-dl was built to do.

but it would get a lot of urls working right away that currently just break.

If you know an URL is from Mastodon, you can prefix it with mastodon: instead of adding its instance to your config file.

gallery-dl mastodon:https://{domain}/@{name}/{long integer id}