mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-09 20:34:35 +02:00
fix(gatesnotes): the unfucked their json (#3849)
This commit is contained in:
parent
3944ae68cb
commit
0c6ffbf5a4
1 changed files with 5 additions and 3 deletions
|
@ -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 = [];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue