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

[TwitterBridge] Fix issue #1621 @<twitter_user> failed with error 429 #1622

Merged
merged 3 commits into from
Jun 25, 2020

Conversation

arnd-s
Copy link
Contributor

@arnd-s arnd-s commented Jun 24, 2020

Fix for #1621

@triatic
Copy link
Contributor

triatic commented Jun 24, 2020

Works for me.

Maintainer note: please merge #1623 alongside this one.

@em92
Copy link
Contributor

em92 commented Jun 25, 2020

Also suggesting this patch on this PR. Without this patch bridge will return misleading 429 error (too many requests), when guest token is suddenly not parsed.

diff --git a/bridges/TwitterBridge.php b/bridges/TwitterBridge.php
index 7afa395..eba1576 100644
--- a/bridges/TwitterBridge.php
+++ b/bridges/TwitterBridge.php
@@ -420,6 +420,7 @@ EOD;
 
                $guestTokenRegex = '/gt=([0-9]*)/m';
                preg_match_all($guestTokenRegex, $pageContent['header'], $guestTokenMatches, PREG_SET_ORDER, 0);
+               if (!$guestTokenMatches) returnServerError("Could not parse guest token");
                $guestToken = $guestTokenMatches[0][1];
                return $guestToken;
        }

@teromene teromene merged commit e87b868 into RSS-Bridge:master Jun 25, 2020
comlaterra pushed a commit to comlaterra/rss-bridge that referenced this pull request Sep 25, 2020
… error 429 (RSS-Bridge#1622)

* [TwitterBridge] Fix issue RSS-Bridge#1621 @<twitter_user> failed with error 429
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.

4 participants