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

[docs] update OAuth guide in README.rst #3496

Merged
merged 2 commits into from
Jan 6, 2023
Merged

Conversation

ClosedPort22
Copy link
Contributor

No description provided.

The Pixiv extractor requires a 'refresh-token' since 8974f03 (mikf#1304).
@ClosedPort22 ClosedPort22 changed the title [docs] update OAuth guide in configuration.rst [docs] update OAuth guide in README.rst Jan 5, 2023
*gallery-dl* supports user authentication via OAuth_ for some extractors.
This is necessary for
``pixiv``
and optional for
``deviantart``,
``flickr``,
``reddit``,
``smugmug``,
``tumblr``,
and ``mastodon`` instances.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One could argue that it is not entirely optional for Mastodon instances, since it is required to map user name to ID, but I have no idea how to accurately describe that here without being too verbose.

.../users/username requires an access token
.../users/id:12345 works without
(for instances that are not supported by default)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current description is okay, since it's not entirely non-functional without the token, unlike Pixiv. Maybe a more detailed description could be added to configuration.rst (although extractor.mastodon.access-token is currently undocumented).

@ClosedPort22
Copy link
Contributor Author

And by the way, I think the dot in mastodon.social is messing up -o. extractor.mastodon.social.access-token=foo doesn't work.

@rautamiekka
Copy link
Contributor

extractor.mastodon.social.access-token=foo.

It's never been used like that anyway.

@ClosedPort22
Copy link
Contributor Author

extractor.mastodon.social.access-token=foo.

It's never been used like that anyway.

I do use this feature from time to time. Both extractor.pawoo.access-token=foo and extractor.mastodon.access-token=foo (all instances) work fine.

@rautamiekka
Copy link
Contributor

I mean it's never used with the TLD.

@ClosedPort22
Copy link
Contributor Author

I mean it's never used with the TLD.

That's the identifier used by the instance:

INSTANCES = {
"mastodon.social": {

I think it would work just fine in the config file, which doesn't use dot notation, but perhaps something like an underscore would've been a better choice.

@rautamiekka
Copy link
Contributor

Ok, fair enough.

@mikf mikf merged commit ac78712 into mikf:master Jan 6, 2023
@mikf
Copy link
Owner

mikf commented Jan 6, 2023

Yeah, it was a bad decision to use mastodon.social with a dot as category name, but I'd rather not change it right now (backwards compatibility and such).

I think it would be best to eventually (v2.0?) change the dot notation for -o to use a different character altogether, maybe -o mastodon.social:access-token=TOKEN.

@ClosedPort22 ClosedPort22 deleted the docs-oauth branch January 6, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants