Skip to content

Commit

Permalink
[TwitterBridge] URL to js file with apikey changed again (#1764)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnd-s authored Sep 28, 2020
1 parent 80cc88b commit 01985b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bridges/TwitterBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,10 @@ private function getApiKey() {
$jsMainRegex = '/(https:\/\/abs\.twimg\.com\/responsive-web\/client-web\/main\.[^\.]+\.js)/m';
preg_match_all($jsMainRegex, $twitterPage, $jsMainMatches, PREG_SET_ORDER, 0);
}
if (!$jsMainMatches) {
$jsMainRegex = '/(https:\/\/abs\.twimg\.com\/responsive-web\/client-web-legacy\/main\.[^\.]+\.js)/m';
preg_match_all($jsMainRegex, $twitterPage, $jsMainMatches, PREG_SET_ORDER, 0);
}
if (!$jsMainMatches) {
returnServerError('Could not locate main.js link');
}
Expand Down

0 comments on commit 01985b7

Please sign in to comment.