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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
201 changed files with 262 additions and 513 deletions

View file

@ -76,8 +76,7 @@ class GBAtempBridge extends BridgeAbstract {
public function collectData(){
$html = getSimpleHTMLDOM(self::URI)
or returnServerError('Could not request GBAtemp.');
$html = getSimpleHTMLDOM(self::URI);
switch($this->getInput('type')) {
case 'N':
@ -97,8 +96,7 @@ class GBAtempBridge extends BridgeAbstract {
$url = self::URI . $reviewItem->find('a', 0)->href;
$img = $this->getURI() . extractFromDelimiters($reviewItem->find('a', 0)->style, 'image:url(', ')');
$title = $reviewItem->find('span.review_title', 0)->plaintext;
$content = getSimpleHTMLDOM($url)
or returnServerError('Could not request GBAtemp: ' . $uri);
$content = getSimpleHTMLDOM($url);
$author = $content->find('a.username', 0)->plaintext;
$time = $this->findItemDate($content);
$intro = '<p><b>' . ($content->find('div#review_intro', 0)->plaintext) . '</b></p>';