1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 22:00:23 +02:00

Fix some HTTP error codes (404->500)

This commit is contained in:
ORelio
2015-10-22 15:20:42 +02:00
parent 5c987b74d5
commit 0051615b82
5 changed files with 9 additions and 9 deletions

View File

@@ -21,7 +21,7 @@ class SiliconBridge extends BridgeAbstract {
}
$feedUrl = 'http://www.silicon.fr/feed';
$html = file_get_html($feedUrl) or $this->returnError('Could not request Silicon: '.$feedUrl, 404);
$html = file_get_html($feedUrl) or $this->returnError('Could not request Silicon: '.$feedUrl, 500);
$limit = 0;
foreach($html->find('item') as $element) {
@@ -31,7 +31,7 @@ class SiliconBridge extends BridgeAbstract {
$article_uri = $element->innertext;
$article_uri = substr($article_uri, strpos($article_uri, '<link>') + 6);
$article_uri = substr($article_uri, 0, strpos($article_uri, '</link>'));
$article_html = file_get_html($article_uri) or $this->returnError('Could not request Silicon: '.$article_uri, 404);
$article_html = file_get_html($article_uri) or $this->returnError('Could not request Silicon: '.$article_uri, 500);
//Build article contents from corresponding elements
$thumbnailUri = $element->find('enclosure', 0)->url;