mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 18:14:44 +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:
parent
73a1bcf3d6
commit
74f0572d91
124 changed files with 401 additions and 400 deletions
|
@ -24,7 +24,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
|
|||
$this->name = "Cpasbien Bridge";
|
||||
$this->uri = "http://www.cpasbien.io";
|
||||
$this->description = "Returns latest torrents from a request query";
|
||||
$this->update = "2016-08-09";
|
||||
$this->update = '2016-08-17';
|
||||
|
||||
$this->parameters[] =
|
||||
'[
|
||||
|
@ -44,10 +44,10 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
|
|||
$html = '';
|
||||
if (isset($param['q'])) { /* keyword search mode */
|
||||
$this->request = str_replace(" ","-",trim($param['q']));
|
||||
$html = $this->file_get_html($this->uri.'/recherche/'.urlencode($this->request).'.html') or $this->returnError('No results for this query.', 404);
|
||||
$html = $this->file_get_html($this->uri.'/recherche/'.urlencode($this->request).'.html') or $this->returnServerError('No results for this query.');
|
||||
}
|
||||
else {
|
||||
$this->returnError('You must specify a keyword (?q=...).', 400);
|
||||
$this->returnClientError('You must specify a keyword (?q=...).');
|
||||
}
|
||||
|
||||
foreach ($html->find('#gauche',0)->find('div') as $episode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue