mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
* [CourrierInternationalBridge] fix: skip unusual feed items #2570 This skips feed items who don't have content. The one I encountered was a horoscope. This change makes sure the bridge dont errors out.
This commit is contained in:
parent
8717c33646
commit
983df45264
@ -15,11 +15,10 @@ class CourrierInternationalBridge extends FeedExpander {
|
|||||||
$item = parent::parseItem($feedItem);
|
$item = parent::parseItem($feedItem);
|
||||||
|
|
||||||
$articlePage = getSimpleHTMLDOMCached($feedItem->link);
|
$articlePage = getSimpleHTMLDOMCached($feedItem->link);
|
||||||
$content = $articlePage->find('.article-text', 0);
|
$content = $articlePage->find('.article-text, depeche-text', 0);
|
||||||
if(!$content) {
|
if (!$content) {
|
||||||
$content = $articlePage->find('.depeche-text', 0);
|
return $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
$item['content'] = sanitize($content);
|
$item['content'] = sanitize($content);
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
|
Loading…
Reference in New Issue
Block a user