mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-11 19:14:09 +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,7 +7,7 @@ class XbooruBridge extends BridgeAbstract{
|
||||
$this->name = "Xbooru";
|
||||
$this->uri = "http://xbooru.com/";
|
||||
$this->description = "Returns images from given page";
|
||||
$this->update = "2016-08-09";
|
||||
$this->update = '2016-08-17';
|
||||
|
||||
$this->parameters[] =
|
||||
'[
|
||||
@@ -33,7 +33,7 @@ class XbooruBridge extends BridgeAbstract{
|
||||
if (isset($param['t'])) {
|
||||
$tags = urlencode($param['t']);
|
||||
}
|
||||
$html = $this->file_get_html("http://xbooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnError('Could not request Xbooru.', 404);
|
||||
$html = $this->file_get_html("http://xbooru.com/index.php?page=post&s=list&tags=$tags&pid=$page") or $this->returnServerError('Could not request Xbooru.');
|
||||
|
||||
|
||||
foreach($html->find('div[class=content] span') as $element) {
|
||||
|
Reference in New Issue
Block a user