mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-23 01:55:27 +03:00
[TwitterBridge] apikey fetched every time (#1663)
The apikey is fetched every time because $data is not an array. Update the condition to expire the api key at the same time as the guest token.
This commit is contained in:
parent
a33088ca99
commit
f5916a2f74
1 changed files with 1 additions and 1 deletions
|
@ -374,7 +374,7 @@ EOD;
|
|||
$data = $cache->loadData();
|
||||
|
||||
$apiKey = null;
|
||||
if($data === null || !is_array($data) || count($data) != 1) {
|
||||
if($data === null || (time() - $refresh) > self::GUEST_TOKEN_EXPIRY) {
|
||||
$twitterPage = getContents('https://twitter.com');
|
||||
|
||||
$jsMainRegex = '/(https:\/\/abs\.twimg\.com\/responsive-web\/web_legacy\/main\.[^\.]+\.js)/m';
|
||||
|
|
Loading…
Reference in a new issue