1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-16 14:36:23 +02:00

fix(gatesnotes): the unfucked their json (#3849)

This commit is contained in:
Dag
2023-12-19 08:46:37 +01:00
committed by GitHub
parent 3944ae68cb
commit 0c6ffbf5a4

View File

@@ -23,12 +23,14 @@ class GatesNotesBridge extends BridgeAbstract
$cleanedContent = str_replace([ $cleanedContent = str_replace([
'<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">', '<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">',
'</string>', '</string>',
'\r\n',
], '', $rawContent); ], '', $rawContent);
$cleanedContent = str_replace('\"', '"', $cleanedContent); // $cleanedContent = str_replace('\"', '"', $cleanedContent);
$cleanedContent = trim($cleanedContent, '"'); // $cleanedContent = trim($cleanedContent, '"');
$json = Json::decode($cleanedContent, false); $json = Json::decode($cleanedContent, false);
if (is_string($json)) {
throw new \Exception('wtf? ' . $json);
}
foreach ($json as $article) { foreach ($json as $article) {
$item = []; $item = [];