mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-10 17:08:47 +00:00
fix(gatesnotes): the unfucked their json (#3849)
This commit is contained in:
parent
3944ae68cb
commit
0c6ffbf5a4
@ -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…
Reference in New Issue
Block a user