1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-05 16:17:28 +02:00

[EconomistBridge] Handle 404s in feed gracefully (#3965)

This commit is contained in:
Korytov Pavel
2024-02-08 17:36:03 +03:00
committed by GitHub
parent 75a0a779c0
commit cfef482366

View File

@@ -99,7 +99,12 @@ class EconomistBridge extends FeedExpander
protected function parseItem(array $item) protected function parseItem(array $item)
{ {
$dom = getSimpleHTMLDOM($item['uri']); try {
$dom = getSimpleHTMLDOM($item['uri']);
} catch (Exception $e) {
$item['content'] = $e->getMessage();
return $item;
}
$article = $dom->find('#new-article-template', 0); $article = $dom->find('#new-article-template', 0);
if ($article == null) { if ($article == null) {