From e261c9a594b60c6d3b2e74affc9a2e9d6eaf5af9 Mon Sep 17 00:00:00 2001 From: ORelio Date: Thu, 22 Oct 2015 14:51:39 +0200 Subject: [PATCH 1/8] Add Anime Ultime bridge --- bridges/AnimeUltimeBridge.php | 109 ++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 bridges/AnimeUltimeBridge.php diff --git a/bridges/AnimeUltimeBridge.php b/bridges/AnimeUltimeBridge.php new file mode 100644 index 0000000..82c2b5f --- /dev/null +++ b/bridges/AnimeUltimeBridge.php @@ -0,0 +1,109 @@ + Type = A (Anime), D (Drama), T (Tokusatsu), or leave empty for everything + * @maintainer ORelio + * @update 2015-09-07 + * @use1(type="A/D/T/Empty") + */ +class AnimeUltimeBridge extends BridgeAbstract { + + private $filter = 'Releases'; + + public function collectData(array $param) { + + //Add type filter if provided + $typeFilter = ''; + if (!empty($param['type'])) { + if ($param['type'] == 'A' || $param['type'] == 'D' || $param['type'] == 'T') { + $typeFilter = $param['type']; + if ($typeFilter == 'A') { $this->filter = 'Anime'; } + if ($typeFilter == 'D') { $this->filter = 'Drama'; } + if ($typeFilter == 'T') { $this->filter = 'Tokusatsu'; } + } else $this->returnError('The provided type filter is invalid. Expecting A, D, T, or no filter', 400); + } + + //Build date and filters for making requests + $thismonth = date('mY').$typeFilter; + $lastmonth = date('mY', mktime(0, 0, 0, date('n') - 1, 1, date('Y'))).$typeFilter; + + //Process each HTML page until having 10 releases + $processedOK = 0; + foreach (array($thismonth, $lastmonth) as $requestFilter) { + + //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); + + //Relases are sorted by day : process each day individually + foreach ($html->find('div.history', 0)->find('h3') as $daySection) { + + //Retrieve day and build date information + $dateString = $daySection->plaintext; + $day = intval(substr($dateString, strpos($dateString, ' ') + 1, 2)); + $item_date = strtotime(str_pad($day, 2, '0', STR_PAD_LEFT).'-'.substr($requestFilter, 0, 2).'-'.substr($requestFilter, 2, 4)); + $release = $daySection->next_sibling()->next_sibling()->first_child(); //

day


<-- useful data in table rows + + //Process each release of that day, ignoring first table row: contains table headers + while (!is_null($release = $release->next_sibling())) { + if (count($release->find('td')) > 0) { + + //Retrieve metadata from table columns + $item_link_element = $release->find('td', 0)->find('a', 0); + $item_uri = $website.$item_link_element->href; + $item_name = html_entity_decode($item_link_element->plaintext); + $item_image = $website.substr($item_link_element->onmouseover, 37, strpos($item_link_element->onmouseover, ' ', 37) - 37); + $item_episode = html_entity_decode(str_pad($release->find('td', 1)->plaintext, 2, '0', STR_PAD_LEFT)); + $item_fansub = $release->find('td', 2)->plaintext; + $item_type = $release->find('td', 4)->plaintext; + + 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); + $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); + $item_description = str_replace("\r", '', $item_description); + $item_description = str_replace("\n", '', $item_description); + $item_description = utf8_encode($item_description); + + //Build and add final item + $item = new \Item(); + $item->uri = $item_uri; + $item->title = $item_name.' '.$item_type.' '.$item_episode; + $item->author = $item_fansub; + $item->timestamp = $item_date; + $item->thumbnailUri = $item_image; + $item->content = $item_description; + $this->items[] = $item; + $processedOK++; + + //Stop processing once limit is reached + if ($processedOK >= 10) + return; + } + } + } + } + } + } + + public function getName() { + return 'Latest '.$this->filter.' - Anime-Ultime Bridge'; + } + + public function getURI() { + return 'http://www.anime-ultime.net/'; + } + + public function getCacheDuration() { + return 3600*3; // 3 hours + } + +} From 24f3bb84d8f8a4638161c7056cc2e8cbea73584c Mon Sep 17 00:00:00 2001 From: ORelio Date: Thu, 22 Oct 2015 14:51:56 +0200 Subject: [PATCH 2/8] Add CNET News bridge --- bridges/CNETBridge.php | 99 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 bridges/CNETBridge.php diff --git a/bridges/CNETBridge.php b/bridges/CNETBridge.php new file mode 100644 index 0000000..dfa21d4 --- /dev/null +++ b/bridges/CNETBridge.php @@ -0,0 +1,99 @@ + You may specify a topic, else all topics are selected. +* @maintainer ORelio +* @update 2015-09-10 +* @use1(topic="Topic name") +*/ +class CNETBridge extends BridgeAbstract { + + private $topicName = ''; + + public function collectData(array $param) { + + function ExtractFromDelimiters($string, $start, $end) { + if (strpos($string, $start) !== false) { + $section_retrieved = substr($string, strpos($string, $start) + strlen($start)); + $section_retrieved = substr($section_retrieved, 0, strpos($section_retrieved, $end)); + return $section_retrieved; + } return false; + } + + function StripWithDelimiters($string, $start, $end) { + while (strpos($string, $start) !== false) { + $section_to_remove = substr($string, strpos($string, $start)); + $section_to_remove = substr($section_to_remove, 0, strpos($section_to_remove, $end) + strlen($end)); + $string = str_replace($section_to_remove, '', $string); + } return $string; + } + + function CleanArticle($article_html) { + $article_html = '

'.substr($article_html, strpos($article_html, '

') + 18); + $article_html = StripWithDelimiters($article_html, ''); + $article_html = StripWithDelimiters($article_html, '

', '
'))); + $article_author = trim($article_html->find('a.author', 0)->plaintext); + + $item = new \Item(); + $item->uri = $article_uri; + $item->thumbnailUri = $article_thumbnail; + $item->title = $article_title; + $item->author = $article_author; + $item->timestamp = $article_timestamp; + $item->content = $article_content; + $this->items[] = $item; + $limit++; + } + } + } + } + + public function getName() { + return 'CNET News Bridge'.(empty($this->topicName) ? '' : ' - '.$this->topicName); + } + + public function getURI() { + return 'http://www.cnet.com/'; + } + + public function getCacheDuration() { + return 1800; // 30 minutes + // return 0; + } +} From e7966dd1023cb9945037e0d0f226704554128084 Mon Sep 17 00:00:00 2001 From: ORelio Date: Thu, 22 Oct 2015 14:52:15 +0200 Subject: [PATCH 3/8] Add Le Monde Informatique bridge --- bridges/LeMondeInformatiqueBridge.php | 79 +++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 bridges/LeMondeInformatiqueBridge.php diff --git a/bridges/LeMondeInformatiqueBridge.php b/bridges/LeMondeInformatiqueBridge.php new file mode 100644 index 0000000..e7617b4 --- /dev/null +++ b/bridges/LeMondeInformatiqueBridge.php @@ -0,0 +1,79 @@ +', '', $string); + return $string; + } + + function StripWithDelimiters($string, $start, $end) { + while (strpos($string, $start) !== false) { + $section_to_remove = substr($string, strpos($string, $start)); + $section_to_remove = substr($section_to_remove, 0, strpos($section_to_remove, $end) + strlen($end)); + $string = str_replace($section_to_remove, '', $string); + } return $string; + } + + function CleanArticle($article_html) { + $article_html = StripWithDelimiters($article_html, ''); + $article_html = StripWithDelimiters($article_html, '

', '

'); + return $article_html; + } + + $feedUrl = 'http://www.lemondeinformatique.fr/rss/rss.xml'; + $html = file_get_html($feedUrl) or $this->returnError('Could not request LeMondeInformatique: '.$feedUrl, 404); + $limit = 0; + + foreach($html->find('item') as $element) { + if($limit < 5) { + + //Retrieve article details + $article_uri = $element->innertext; + $article_uri = substr($article_uri, strpos($article_uri, '') + 6); + $article_uri = substr($article_uri, 0, strpos($article_uri, '')); + $article_html = file_get_html($article_uri) or $this->returnError('Could not request LeMondeInformatique: '.$article_uri, 404); + $thumbnailUri = $article_html->find('div#article', 0)->find('img#illustration', 0)->src; + $article_content = CleanArticle($article_html->find('div#article', 0)->innertext); + $article_title = $article_html->find('h1.cleanprint-title', 0)->plaintext; + + //Build and add final item + $item = new \Item(); + $item->uri = $article_uri; + $item->thumbnailUri = $thumbnailUri; + $item->title = $article_title; + $item->author = StripCDATA($element->find('dc:creator', 0)->innertext); + $item->timestamp = strtotime($element->find('dc:date', 0)->plaintext); + $item->content = $article_content; + $this->items[] = $item; + $limit++; + } + } + } + + public function getName() { + return 'Le Monde Informatique'; + } + + public function getURI() { + return 'http://www.lemondeinformatique.fr/'; + } + + public function getCacheDuration() { + return 1800; // 30 minutes + // return 0; + } +} From f036bff6b4836393d5e6b49a5668a5171683fa4c Mon Sep 17 00:00:00 2001 From: ORelio Date: Thu, 22 Oct 2015 14:52:34 +0200 Subject: [PATCH 4/8] Add Silicon News bridge --- bridges/SiliconBridge.php | 75 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 bridges/SiliconBridge.php diff --git a/bridges/SiliconBridge.php b/bridges/SiliconBridge.php new file mode 100644 index 0000000..523f33e --- /dev/null +++ b/bridges/SiliconBridge.php @@ -0,0 +1,75 @@ +', '', $string); + return $string; + } + + $feedUrl = 'http://www.silicon.fr/feed'; + $html = file_get_html($feedUrl) or $this->returnError('Could not request Silicon: '.$feedUrl, 404); + $limit = 0; + + foreach($html->find('item') as $element) { + if($limit < 5) { + + //Retrieve article Uri and get that page + $article_uri = $element->innertext; + $article_uri = substr($article_uri, strpos($article_uri, '') + 6); + $article_uri = substr($article_uri, 0, strpos($article_uri, '')); + $article_html = file_get_html($article_uri) or $this->returnError('Could not request Silicon: '.$article_uri, 404); + + //Build article contents from corresponding elements + $thumbnailUri = $element->find('enclosure', 0)->url; + $article_content = '

' + .'

'.$article_html->find('div.entry-excerpt', 0)->plaintext.'

' + .$article_html->find('div.entry-content', 0)->innertext; + + //Remove useless scripts left in the page + while (strpos($article_content, '') + 9); + $article_content = str_replace($script_section, '', $article_content); + } + + //Build and add final item + $item = new \Item(); + $item->uri = $article_uri; + $item->thumbnailUri = $thumbnailUri; + $item->title = StripCDATA($element->find('title', 0)->innertext); + $item->author = StripCDATA($element->find('dc:creator', 0)->innertext); + $item->timestamp = strtotime($element->find('pubDate', 0)->plaintext); + $item->content = $article_content; + $this->items[] = $item; + $limit++; + } + } + } + + public function getName() { + return 'Silicon Bridge'; + } + + public function getURI() { + return 'http://www.silicon.fr/'; + } + + public function getCacheDuration() { + return 1800; // 30 minutes + // return 0; + } +} From 44edc7fc22bfb6d9d45e561f827dba166aa20200 Mon Sep 17 00:00:00 2001 From: ORelio Date: Thu, 22 Oct 2015 14:55:11 +0200 Subject: [PATCH 5/8] Add 3DS Scene Releases bridge --- bridges/Releases3DSBridge.php | 134 ++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 bridges/Releases3DSBridge.php diff --git a/bridges/Releases3DSBridge.php b/bridges/Releases3DSBridge.php new file mode 100644 index 0000000..465bdfa --- /dev/null +++ b/bridges/Releases3DSBridge.php @@ -0,0 +1,134 @@ +returnError('Could not request 3dsdb: '.$dataUrl, 404); + $limit = 0; + + foreach (array_reverse(explode('', $xml)) as $element) { + if ($limit < 5) { + if (strpos($element, '') !== false) { + + $id = ExtractFromDelimiters($element, '', ''); + $name = ExtractFromDelimiters($element, '', ''); + $publisher = ExtractFromDelimiters($element, '', ''); + $region = ExtractFromDelimiters($element, '', ''); + $group = ExtractFromDelimiters($element, '', ''); + $imagesize = ExtractFromDelimiters($element, '', ''); + $serial = ExtractFromDelimiters($element, '', ''); + $titleid = ExtractFromDelimiters($element, '', ''); + $imgcrc = ExtractFromDelimiters($element, '', ''); + $filename = ExtractFromDelimiters($element, '', ''); + $releasename = ExtractFromDelimiters($element, '', ''); + $trimmedsize = ExtractFromDelimiters($element, '', ''); + $firmware = ExtractFromDelimiters($element, '', ''); + $type = ExtractFromDelimiters($element, '', ''); + $card = ExtractFromDelimiters($element, '', ''); + + if (!empty($releasename)) { + + //Retrieve cover art and short desc from IGN? + $ignResult = false; $ignDescription = ''; $ignLink = ''; $ignDate = time(); $ignCoverArt = ''; + $ignSearchUrl = 'http://www.ign.com/search?q='.urlencode($name); + if ($ignResult = file_get_html($ignSearchUrl)) { + $ignCoverArt = $ignResult->find('div.search-item-media', 0)->find('img', 0)->src; + $ignDesc = $ignResult->find('div.search-item-description', 0)->plaintext; + $ignLink = $ignResult->find('div.search-item-sub-title', 0)->find('a', 1)->href; + $ignDate = strtotime(trim($ignResult->find('span.publish-date', 0)->plaintext)); + $ignDescription = '
'.$ignDesc.' More at IGN
'; + } + + //Main section : Release description from 3DS database + $releaseDescription = '

Release Details

' + .'Release ID: '.$id.'
' + .'Game Name: '.$name.'
' + .'Publisher: '.$publisher.'
' + .'Region: '.$region.'
' + .'Group: '.$group.'
' + .'Image size: '.(intval($imagesize)/8).'MB
' + .'Serial: '.$serial.'
' + .'Title ID: '.$titleid.'
' + .'Image CRC: '.$imgcrc.'
' + .'File Name: '.$filename.'
' + .'Release Name: '.$releasename.'
' + .'Trimmed size: '.intval(intval($trimmedsize)/1048576).'MB
' + .'Firmware: '.$firmware.'
' + .'Type: '.TypeToString($type).'
' + .'Card: '.CardToString($card).'
'; + + //Build search links section to facilitate release search using search engines + $releaseNameEncoded = urlencode(str_replace(' ', '+', $releasename)); + $searchLinkGoogle = 'https://google.com/?q='.$releaseNameEncoded; + $searchLinkDuckDuckGo = 'https://duckduckgo.com/?q='.$releaseNameEncoded; + $searchLinkQwant = 'https://lite.qwant.com/?q='.$releaseNameEncoded.'&t=web'; + $releaseSearchLinks = '

Search this release

'; + + //Build and add final item with the above three sections + $item = new \Item(); + $item->title = $name; + $item->author = $publisher; + $item->timestamp = $ignDate; + $item->thumbnailUri = $ignCoverArt; + $item->uri = empty($ignLink) ? $searchLinkDuckDuckGo : $ignLink; + $item->content = $ignDescription.$releaseDescription.$releaseSearchLinks; + $this->items[] = $item; + $limit++; + } + } + } + } + } + + public function getName() { + return '3DS Scene Releases'; + } + + public function getURI() { + return 'http://www.3dsdb.com/'; + } + + public function getCacheDuration() { + return 10800; //3 hours + } +} From ea7c8cc314db834d8d104ca7340e927dc60c8d04 Mon Sep 17 00:00:00 2001 From: ORelio Date: Thu, 22 Oct 2015 14:57:33 +0200 Subject: [PATCH 6/8] Add T411 bridge --- bridges/T411Bridge.php | 101 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 bridges/T411Bridge.php diff --git a/bridges/T411Bridge.php b/bridges/T411Bridge.php new file mode 100644 index 0000000..fc205b3 --- /dev/null +++ b/bridges/T411Bridge.php @@ -0,0 +1,101 @@ + Use url part after '?' mark when using their search engine + * @maintainer ORelio + * @update 2015-09-05 + * @use1(search="search criteria") + */ +class T411Bridge extends BridgeAbstract { + + public function collectData(array $param) { + + //Utility function for extracting CDATA fields + function StripCDATA($string) { + $string = str_replace('', '', $string); + return $string; + } + + //Utility function for removing text based on specified delimiters + function StripWithDelimiters($string, $start, $end) { + while (strpos($string, $start) !== false) { + $section_to_remove = substr($string, strpos($string, $start)); + $section_to_remove = substr($section_to_remove, 0, strpos($section_to_remove, $end) + strlen($end)); + $string = str_replace($section_to_remove, '', $string); + } return $string; + } + + //Ensure proper parameters have been provided + if (empty($param['search'])) { + $this->returnError('You must specify a search criteria', 400); + } + + //Retrieve torrent listing as truncated rss, which does not contain torrent description + $url = 'http://www.t411.io/torrents/rss/?'.$param['search'].'&order=added&type=desc'; + $html = file_get_html($url) or $this->returnError('Could not request t411: '.$url, 500); + $limit = 0; + + //Process each item individually + foreach($html->find('item') as $element) { + + //Limit total amount of requests + if ($limit < 5) { + + //Requests are rate-limited + sleep(1); //So we need to wait + + //Retrieve data from RSS entry + $item_uri = StripCDATA($element->find('guid', 0)->plaintext); + $item_title = StripWithDelimiters(StripCDATA($element->find('title', 0)->innertext), ' (S:', ')'); + $item_date = strtotime($element->find('pubDate', 0)->plaintext); + + //Retrieve full description from torrent page + if ($item_html = file_get_html($item_uri)) { + + //Retrieve data from page contents + $item_desc = $item_html->find('div.description', 0); + $item_author = $item_html->find('a.profile', 0)->innertext; + + //Retrieve image for thumbnail or generic logo fallback + $item_image = 'http://www.t411.io/themes/blue/images/logo.png'; + foreach ($item_desc->find('img') as $img) { + if (strpos($img->src, 'dreamprez') === false) { + $item_image = $img->src; + break; + } + } + + //Build and add final item + $item = new \Item(); + $item->uri = $item_uri; + $item->title = $item_title; + $item->author = $item_author; + $item->timestamp = $item_date; + $item->thumbnailUri = $item_image; + $item->content = utf8_encode($item_desc->innertext); + $this->items[] = $item; + $limit++; + } + } + } + } + + public function getName() { + return "T411 Bridge"; + } + + public function getURI() { + return 'https://t411.io'; + } + + public function getCacheDuration() { + return 3600*3; // 3 hours + } + +} + From 5c987b74d5fabd6adcfb9cccd424c282abcf7081 Mon Sep 17 00:00:00 2001 From: ORelio Date: Thu, 22 Oct 2015 15:01:16 +0200 Subject: [PATCH 7/8] Update T411 domain name --- bridges/T411Bridge.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bridges/T411Bridge.php b/bridges/T411Bridge.php index fc205b3..8571bb0 100644 --- a/bridges/T411Bridge.php +++ b/bridges/T411Bridge.php @@ -4,10 +4,10 @@ * Returns 5 newest torrents with specified search criteria * * @name T411 - * @homepage https://t411.io/ + * @homepage https://t411.in/ * @description Returns the 5 newest torrents with specified search terms
Use url part after '?' mark when using their search engine * @maintainer ORelio - * @update 2015-09-05 + * @update 2015-10-22 * @use1(search="search criteria") */ class T411Bridge extends BridgeAbstract { @@ -36,7 +36,7 @@ class T411Bridge extends BridgeAbstract { } //Retrieve torrent listing as truncated rss, which does not contain torrent description - $url = 'http://www.t411.io/torrents/rss/?'.$param['search'].'&order=added&type=desc'; + $url = 'http://www.t411.in/torrents/rss/?'.$param['search'].'&order=added&type=desc'; $html = file_get_html($url) or $this->returnError('Could not request t411: '.$url, 500); $limit = 0; @@ -62,7 +62,7 @@ class T411Bridge extends BridgeAbstract { $item_author = $item_html->find('a.profile', 0)->innertext; //Retrieve image for thumbnail or generic logo fallback - $item_image = 'http://www.t411.io/themes/blue/images/logo.png'; + $item_image = 'http://www.t411.in/themes/blue/images/logo.png'; foreach ($item_desc->find('img') as $img) { if (strpos($img->src, 'dreamprez') === false) { $item_image = $img->src; @@ -90,7 +90,7 @@ class T411Bridge extends BridgeAbstract { } public function getURI() { - return 'https://t411.io'; + return 'https://t411.in'; } public function getCacheDuration() { From 0051615b8207ea82aefab63287b2f7ef27cde290 Mon Sep 17 00:00:00 2001 From: ORelio Date: Thu, 22 Oct 2015 15:20:42 +0200 Subject: [PATCH 8/8] 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, '