Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mastodon instances #144

Closed
ghost opened this issue Dec 24, 2018 · 1 comment
Closed

Mastodon instances #144

ghost opened this issue Dec 24, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 24, 2018

Hello,
Since this program can already download from Pawoo, is it possible to modify that extractor to work with other Mastodon instances? Many thanks.

mikf added a commit that referenced this issue Jan 19, 2019
Extractors for Mastodon instances can now be dynamically generated,
based on the instance names in the 'extractor.mastodon.*' config path.

Example:
{
    "extractor": {
        "mastodon": {
            "pawoo.net": { ... },
            "mastodon.xyz": { ... },
            "tabletop.social": { ... },
            ...
        }
    }
}

Each entry requires an 'access-token' value, which can be generated with
'gallery-dl oauth:mastodon:<instance URL>'.
An 'access-token' (as well as a 'client-id' and 'client-secret') for
pawoo.net is always available, but can be overwritten as necessary.
@mikf
Copy link
Owner

mikf commented Jan 19, 2019

The latest commit (b8fed34) adds support for pretty much any Mastodon instance, but you have to do a bit of manual work for each one. For example to register https://tabletop.social/ with gallery-dl, you have to run

$ gallery-dl oauth:mastodon:https://tabletop.social/

to get the necessary OAuth2 credentials and an access-token. Then you just have to put these values in your config file and it should work:

{
    "extractor":
    {
        "mastodon":
        {
            "tabletop.social":
            {
                "client-id": "...",
                "client-secret": "...",
                "access-token": "..."
            }
        }
    }
}

client-id and client-secret are optional, but it doesn't hurt to add them as well.

mikf added a commit that referenced this issue Jan 27, 2019
- allow instances to specify their own 'category'
- improve config lookup:
  - first look into extractor.<category>.*
  - and afterwards look into extractor.mastodon.<instance>.*
- add a default entry for pawoo.net in a way that actually works
- add an 'instance' keyword and turn 'tags' into a usable list
@mikf mikf closed this as completed Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant