mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-11 11:04:36 +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:
@@ -23,8 +23,7 @@ class MallTvBridge extends BridgeAbstract {
|
||||
}
|
||||
|
||||
private function getUploadTimeFromUrl($url) {
|
||||
$html = getSimpleHTMLDOM($url)
|
||||
or returnServerError('Could not request MALL.TV detail page');
|
||||
$html = getSimpleHTMLDOM($url);
|
||||
|
||||
$scriptLdJson = $html->find('script[type="application/ld+json"]', 0)->innertext;
|
||||
if (!preg_match('/[\'"]uploadDate[\'"]\s*:\s*[\'"](\d{4}-\d{2}-\d{2})[\'"]/', $scriptLdJson, $match)) {
|
||||
@@ -41,8 +40,7 @@ class MallTvBridge extends BridgeAbstract {
|
||||
returnServerError('Invalid url');
|
||||
}
|
||||
|
||||
$html = getSimpleHTMLDOM($url)
|
||||
or returnServerError('Could not request MALL.TV');
|
||||
$html = getSimpleHTMLDOM($url);
|
||||
|
||||
$this->feedUri = $url;
|
||||
$this->feedName = $this->fixChars($html->find('title', 0)->plaintext);
|
||||
|
Reference in New Issue
Block a user