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

[Twitter] tweet-endpoint guest access, authentication, and fallbacks #4353

Open
Infinitay opened this issue Jul 26, 2023 · 0 comments
Open

Comments

@Infinitay
Copy link
Contributor

Version: 1.26.0-dev, post 90231f2

Currently, even if we specify to use guest access on Twitter by setting extractor.twitter.tweet-endpoint to restid, it will not use the guest endpoint if we also supply cookies for Twitter. I was expecting the behavior to instead ignore the cookies and only use the guest endpoint. I think we should change this behavior to either the following:

  • Ignore cookies and authentication when setting tweet-endpoint to restid

    • Regardless of specifying cookies or any other form of authentication for Twitter, it will always use the guest endpoint
    • Doing so wouldn't require us to modify our scripts and configurations
  • Only use the guest access endpoint when we are rate limited when setting tweet-endpoint to restid

    • This would mean that if authentication is provided, prioritize using the detail endpoint. Fallback to restid on rate limit.
    • Currently, even if we specify to use restid, if we also are authenticated it will stop and wait for the rate limit if it encounters it. By making gallery-dl fallback to the guest endpoint, we can continue the gallery-dl process.
    • Doing so wouldn't require us to modify our scripts and configurations
  • (Preferred) Only use the guest access endpoint when the twitter account is not protected

    • This would mean that regardless on whether authentication is provided, prioritize using the restid guest endpoint. Fallback to detail authenticated endpoint when met with an AuthorizationError.
    • This would help mitigate reaching Twitter's new rate limit due to no longer fetching the data with our account if we don't need to
    • Doing so wouldn't require us to modify our scripts and configurations
@Infinitay Infinitay changed the title [Twitter] tweet-endpoint guest access and authentication [Twitter] tweet-endpoint guest access, authentication, and fallbacks Jul 26, 2023
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

No branches or pull requests

1 participant