1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-13 03:54:04 +02:00

bridges: remove redundant "or returnServerError" after getContents/getSimpleHTMLDom/getSimpleHTMLDomCached (#2398)

When fetching website contents, exceptions already raise on fetching error
This commit is contained in:
Eugene Molotov
2022-01-02 14:36:09 +05:00
committed by GitHub
parent fc51c6753d
commit 37cb4091d4
201 changed files with 262 additions and 513 deletions

View File

@@ -101,8 +101,7 @@ class YGGTorrentBridge extends BridgeAbstract {
. $category
. '&sub_category='
. $subcategory
. '&do=search&order=desc&sort=publish_date')
or returnServerError('Unable to query Yggtorrent !');
. '&do=search&order=desc&sort=publish_date');
$count = 0;
$results = $html->find('.results', 0);
@@ -136,7 +135,7 @@ class YGGTorrentBridge extends BridgeAbstract {
$url_full[5] = urlencode($url_full[5]);
$url_full[6] = urlencode($url_full[6]);
$url = implode('/', $url_full);
$page = getSimpleHTMLDOMCached($url) or returnServerError('Unable to query Yggtorrent page !');
$page = getSimpleHTMLDOMCached($url);
$author = $page->find('.informations', 0)->find('a', 4)->plaintext;
$content = $page->find('.default', 1);
return array('author' => $author, 'content' => $content);