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

Implement Retry Mechanism for Twitter Login with Cookie Validation #855

Closed
arslanaybars opened this issue Dec 5, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@arslanaybars
Copy link
Contributor

Describe the bug

When attempting to log in to Twitter using the client, the current implementation does not always account for existing cookies, leading to redundant login attempts. This results in unnecessary API calls, which could potentially trigger rate limits or cause inefficient resource usage.

To Reproduce

  1. Run the Twitter login script with valid cookies already present.
  2. Observe that the login function is still executed, even though the user is technically logged in.

Expected behavior

If valid cookies exist and the user is already logged in, the script should skip the login process and proceed directly to caching the cookies or other subsequent steps.

Additional context

  1. Checking for cookies and logged-in status before attempting login.
  2. Introducing a retry mechanism with a limit of 5 attempts to avoid infinite loops.
  3. Logging detailed errors and outcomes for easier debugging.
@arslanaybars
Copy link
Contributor Author

MERGED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant