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

@@ -155,8 +155,7 @@ class DesoutterBridge extends BridgeAbstract {
}
*/
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not request ' . $this->getURI());
$html = getSimpleHTMLDOM($this->getURI());
$html = defaultLinkTo($html, $this->getURI());
@@ -184,8 +183,7 @@ class DesoutterBridge extends BridgeAbstract {
}
private function getFullNewsArticle($uri) {
$html = getSimpleHTMLDOMCached($uri)
or returnServerError('Unable to load full article!');
$html = getSimpleHTMLDOMCached($uri);
$html = defaultLinkTo($html, $this->getURI());
@@ -199,8 +197,7 @@ class DesoutterBridge extends BridgeAbstract {
* @return void
*/
private function extractNewsLanguages() {
$html = getSimpleHTMLDOMCached('https://www.desouttertools.com/about-desoutter/news-events')
or returnServerError('Error loading news!');
$html = getSimpleHTMLDOMCached('https://www.desouttertools.com/about-desoutter/news-events');
$html = defaultLinkTo($html, static::URI);
@@ -225,8 +222,7 @@ class DesoutterBridge extends BridgeAbstract {
* @return void
*/
private function extractIndustryLanguages() {
$html = getSimpleHTMLDOMCached('https://www.desouttertools.com/industry-4-0/news')
or returnServerError('Error loading news!');
$html = getSimpleHTMLDOMCached('https://www.desouttertools.com/industry-4-0/news');
$html = defaultLinkTo($html, static::URI);