mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 13:50:23 +02:00
bridges: Replace returnError function with more specific
Replacements depend on original error code: 400: returnClientError 404: returnServerError 500: returnServerError 501: returnServerError
This commit is contained in:
@@ -7,12 +7,12 @@ class ZatazBridge extends BridgeAbstract {
|
||||
$this->name = 'Zataz Magazine';
|
||||
$this->uri = 'http://www.zataz.com';
|
||||
$this->description = "ZATAZ Magazine - S'informer, c'est déjà se sécuriser";
|
||||
$this->update = "2016-08-09";
|
||||
$this->update = '2016-08-17';
|
||||
|
||||
}
|
||||
|
||||
public function collectData(array $param) {
|
||||
$html = $this->file_get_html($this->uri) or $this->returnError('Could not request ' . $this->uri, 404);
|
||||
$html = $this->file_get_html($this->uri) or $this->returnServerError('Could not request ' . $this->uri);
|
||||
|
||||
$recent_posts = $html->find('#recent-posts-3', 0)->find('ul', 0)->find('li');
|
||||
foreach ($recent_posts as $article) {
|
||||
|
Reference in New Issue
Block a user