mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
[EconomistBridge] Handle 404s in feed gracefully (#3965)
This commit is contained in:
parent
75a0a779c0
commit
cfef482366
1 changed files with 6 additions and 1 deletions
|
@ -99,7 +99,12 @@ class EconomistBridge extends FeedExpander
|
|||
|
||||
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);
|
||||
if ($article == null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue