1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-11 19:14:09 +02:00

fix(binance): plus some other tweaks (#3753)

This commit is contained in:
Dag
2023-10-13 20:48:08 +02:00
committed by GitHub
parent fd52b9b9a4
commit 5f37c72be0
9 changed files with 46 additions and 53 deletions

View File

@@ -121,6 +121,9 @@ class InstagramBridge extends BridgeAbstract
$directLink = !is_null($this->getInput('direct_links')) && $this->getInput('direct_links');
$data = $this->getInstagramJSON($this->getURI());
if (!$data) {
return;
}
if (!is_null($this->getInput('u'))) {
$userMedia = $data->data->user->edge_owner_to_timeline_media->edges;
@@ -286,9 +289,11 @@ class InstagramBridge extends BridgeAbstract
$html = getContents($uri);
$scriptRegex = '/window\._sharedData = (.*);<\/script>/';
preg_match($scriptRegex, $html, $matches, PREG_OFFSET_CAPTURE, 0);
return json_decode($matches[1][0]);
$ret = preg_match($scriptRegex, $html, $matches, PREG_OFFSET_CAPTURE);
if ($ret) {
return json_decode($matches[1][0]);
}
return null;
}
}