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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user