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

fix: change bearer token for authentication that is less restrictive #28

Merged

Conversation

thewh1teagle
Copy link

Fix #27

@dirdigeng
Copy link

Many thanks to @thewh1teagle. This patch worked for me and the original code was still failing as I switched between the two.

However with this bearer token there seems to be a lower-than-previously rate limit on the number of scraper.IsLoggedIn() calls in a 15-minute period (seems to be ~75 calls) that did not previously apply. My use case is a simple replacement for the cli twurl call I used to use to get a single tweet, so that now is rate limited by the limit on IsLoggedIn rather than the limit on GetTweet. However with multiple GetTweet calls after a single IsLoggedIn I can hit the 150/15 minutes on GetTweet before I hit the ~75/15 minutes on IsLoggedIn. Short-term fix is just to lower the rate of the cli calls, long term fix of batching the GetTweet calls means more upstream re-engineering (sigh). But credit to @thewh1teagle. @imperatrona, @n0madic, and others for being able to do this at all!

@cmj
Copy link

cmj commented Nov 23, 2024

The other Bearer token that worked for me was:
"AAAAAAAAAAAAAAAAAAAAAFQODgEAAAAAVHTp76lzh3rFzcHbmHVvQxYYpTw%3DckAlMINMjmCwxUcaXbAN4XqJVdgMJaHqNOFgPMK0zN1qLqLQCF"

This seems to be more widely-used token so the limits might be higher?

Just checked headers with both. The first one given in the patch is x-rate-limit-limit: 75

This one is x-rate-limit-limit: 2000

@thewh1teagle
Copy link
Author

Thanks. I changed it to the bearer token with the highest rate limit.
I can squash the commits though it may be useful to have the previous bearer token in the history.

@imperatrona imperatrona merged commit 152a0a1 into imperatrona:master Nov 26, 2024
3 checks passed
@imperatrona
Copy link
Owner

@thewh1teagle thank you! this fix works for me

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.

Login(username, password) returns no error but IsLoggedIn() returns false
4 participants