Skip to content

Commit

Permalink
[TwitterBridge] URL to js file with apikey changed (#1698)
Browse files Browse the repository at this point in the history
Fixes #1697
  • Loading branch information
triatic committed Aug 12, 2020
1 parent be08970 commit 268ddf1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bridges/TwitterBridge.php
Expand Up @@ -383,6 +383,10 @@ private function getApiKey() {
$jsMainRegex = '/(https:\/\/abs\.twimg\.com\/responsive-web\/web_legacy\/main\.[^\.]+\.js)/m';
preg_match_all($jsMainRegex, $twitterPage, $jsMainMatches, PREG_SET_ORDER, 0);
}
if (!$jsMainMatches) {
$jsMainRegex = '/(https:\/\/abs\.twimg\.com\/responsive-web\/client-web\/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 268ddf1

Please sign in to comment.