1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-11 19:14:09 +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

@@ -35,8 +35,7 @@ class BinanceBridge extends BridgeAbstract {
}
protected function collectBlogData() {
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not fetch Binance blog data.');
$html = getSimpleHTMLDOM($this->getURI());
$appData = $html->find('script[id="__APP_DATA"]');
$appDataJson = json_decode($appData[0]->innertext);
@@ -64,8 +63,7 @@ class BinanceBridge extends BridgeAbstract {
}
protected function collectAnnouncementData() {
$html = getSimpleHTMLDOM($this->getURI())
or returnServerError('Could not fetch Zendesk announcement data.');
$html = getSimpleHTMLDOM($this->getURI());
foreach($html->find('a.article-list-link') as $a) {
$title = $a->innertext;