From 0051615b8207ea82aefab63287b2f7ef27cde290 Mon Sep 17 00:00:00 2001 From: ORelio Date: Thu, 22 Oct 2015 15:20:42 +0200 Subject: [PATCH] Fix some HTTP error codes (404->500) --- bridges/AnimeUltimeBridge.php | 4 ++-- bridges/CNETBridge.php | 4 ++-- bridges/LeMondeInformatiqueBridge.php | 4 ++-- bridges/Releases3DSBridge.php | 2 +- bridges/SiliconBridge.php | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bridges/AnimeUltimeBridge.php b/bridges/AnimeUltimeBridge.php index 82c2b5f..1b8c745 100644 --- a/bridges/AnimeUltimeBridge.php +++ b/bridges/AnimeUltimeBridge.php @@ -38,7 +38,7 @@ class AnimeUltimeBridge extends BridgeAbstract { //Retrive page contents $website = 'http://www.anime-ultime.net/'; $url = $website.'history-0-1/'.$requestFilter; - $html = file_get_html($url) or $this->returnError('Could not request Anime-Ultime: '.$url, 404); + $html = file_get_html($url) or $this->returnError('Could not request Anime-Ultime: '.$url, 500); //Relases are sorted by day : process each day individually foreach ($html->find('div.history', 0)->find('h3') as $daySection) { @@ -65,7 +65,7 @@ class AnimeUltimeBridge extends BridgeAbstract { if (!empty($item_uri)) { //Retrieve description from description page and convert relative image src info absolute image src - $html_item = file_get_contents($item_uri) or $this->returnError('Could not request Anime-Ultime: '.$item_uri, 404); + $html_item = file_get_contents($item_uri) or $this->returnError('Could not request Anime-Ultime: '.$item_uri, 500); $item_description = substr($html_item, strpos($html_item, 'class="principal_contain" align="center">') + 41); $item_description = substr($item_description, 0, strpos($item_description, '
')); $item_description = str_replace('src="images', 'src="'.$website.'images', $item_description); diff --git a/bridges/CNETBridge.php b/bridges/CNETBridge.php index dfa21d4..0450d1e 100644 --- a/bridges/CNETBridge.php +++ b/bridges/CNETBridge.php @@ -45,7 +45,7 @@ class CNETBridge extends BridgeAbstract { $this->topicName = $param['topic']; $pageUrl = 'http://www.cnet.com/'.(empty($this->topicName) ? '' : 'topics/'.$this->topicName.'/'); - $html = file_get_html($pageUrl) or $this->returnError('Could not request CNET: '.$pageUrl, 404); + $html = file_get_html($pageUrl) or $this->returnError('Could not request CNET: '.$pageUrl, 500); $limit = 0; foreach($html->find('div.socialSharingSmall') as $element) { @@ -57,7 +57,7 @@ class CNETBridge extends BridgeAbstract { if (!empty($article_title) && !empty($article_uri) && strpos($article_uri, '/news/') !== false) { - $article_html = file_get_html($article_uri) or $this->returnError('Could not request CNET: '.$article_uri, 404); + $article_html = file_get_html($article_uri) or $this->returnError('Could not request CNET: '.$article_uri, 500); $article_timestamp = strtotime(ExtractFromDelimiters($article_html->innertext, '