collectExpandableDatas(self::FEED_URL, 10); } protected function parseItem($item) { $item = parent::parseItem($item); if (!preg_match('#fr-fr/actualite.*/ar-(?[\w]*)\?#', $item['uri'], $matches)) { return null; } $jsonString = getContents(self::JSON_URL . $matches['id']); $json = json_decode($jsonString, true); $item['content'] = $json['body']; if (!empty($json['authors'])) { $item['author'] = reset($json['authors'])['name']; } $item['timestamp'] = $json['createdDateTime']; foreach ($json['tags'] as $tag) { $item['categories'][] = $tag['label']; } return $item; } }