Skip to content

Commit

Permalink
fix(gatesnotes): the unfucked their json (RSS-Bridge#3849)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvikan authored Dec 19, 2023
1 parent 3944ae6 commit 0c6ffbf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bridges/GatesNotesBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ public function collectData()
$cleanedContent = str_replace([
'<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">',
'</string>',
'\r\n',
], '', $rawContent);
$cleanedContent = str_replace('\"', '"', $cleanedContent);
$cleanedContent = trim($cleanedContent, '"');
// $cleanedContent = str_replace('\"', '"', $cleanedContent);
// $cleanedContent = trim($cleanedContent, '"');

$json = Json::decode($cleanedContent, false);
if (is_string($json)) {
throw new \Exception('wtf? ' . $json);
}

foreach ($json as $article) {
$item = [];
Expand Down

0 comments on commit 0c6ffbf

Please sign in to comment.