diff --git a/bridges/Arte7Bridge.php b/bridges/Arte7Bridge.php index ff722113..562f648f 100644 --- a/bridges/Arte7Bridge.php +++ b/bridges/Arte7Bridge.php @@ -91,7 +91,8 @@ class Arte7Bridge extends BridgeAbstract { 'Authorization: Bearer ' . self::API_TOKEN ); - $input = getContents($url, $header) or die('Could not request ARTE.'); + $input = getContents($url, $header) + or returnServerError('Could not request ARTE.'); $input_json = json_decode($input, true); foreach($input_json['videos'] as $element) { diff --git a/bridges/FB2Bridge.php b/bridges/FB2Bridge.php index 29df7554..2faa3215 100644 --- a/bridges/FB2Bridge.php +++ b/bridges/FB2Bridge.php @@ -72,15 +72,15 @@ class FB2Bridge extends BridgeAbstract { $pageInfo = $this->getPageInfos($page, $cookies); if($pageInfo['userId'] === null) { - echo <<find('article') as $content) { $item = array(); - //echo $content; die(); + preg_match('/publish_time\\\":([0-9]+),/', $content->getAttribute('data-store', 0), $match); if(isset($match[1])) $timestamp = $match[1]; diff --git a/bridges/GOGBridge.php b/bridges/GOGBridge.php index 669332f0..09f47b4b 100644 --- a/bridges/GOGBridge.php +++ b/bridges/GOGBridge.php @@ -8,8 +8,8 @@ class GOGBridge extends BridgeAbstract { public function collectData() { - $values = getContents('https://www.gog.com/games/ajax/filtered?limit=25&sort=new') or - die('Unable to get the news pages from GOG !'); + $values = getContents('https://www.gog.com/games/ajax/filtered?limit=25&sort=new') + or returnServerError('Unable to get the news pages from GOG !'); $decodedValues = json_decode($values); $limit = 0; @@ -38,8 +38,8 @@ class GOGBridge extends BridgeAbstract { private function buildGameContentPage($game) { - $gameDescriptionText = getContents('https://api.gog.com/products/' . $game->id . '?expand=description') or - die('Unable to get game description from GOG !'); + $gameDescriptionText = getContents('https://api.gog.com/products/' . $game->id . '?expand=description') + or returnServerError('Unable to get game description from GOG !'); $gameDescriptionValue = json_decode($gameDescriptionText); diff --git a/bridges/Rue89Bridge.php b/bridges/Rue89Bridge.php index 934ef991..bbb14662 100644 --- a/bridges/Rue89Bridge.php +++ b/bridges/Rue89Bridge.php @@ -9,7 +9,7 @@ class Rue89Bridge extends BridgeAbstract { public function collectData() { $jsonArticles = getContents('https://appdata.nouvelobs.com/rue89/feed.json') - or die('Unable to query Rue89 !'); + or returnServerError('Unable to query Rue89 !'); $articles = json_decode($jsonArticles)->items; foreach($articles as $article) { $this->items[] = $this->getArticle($article); @@ -19,7 +19,8 @@ class Rue89Bridge extends BridgeAbstract { private function getArticle($articleInfo) { - $articleJson = getContents($articleInfo->json_url) or die('Unable to get article !'); + $articleJson = getContents($articleInfo->json_url) + or returnServerError('Unable to get article !'); $article = json_decode($articleJson); $item = array(); $item['title'] = $article->title;