[NordbayernBridge] Exclude slideshows when handling articles (#2117)

This commit is contained in:
Christian Schabesberger 2021-05-19 10:43:10 +02:00 committed by GitHub
parent e8d241e8c9
commit 28aaf59007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,13 @@ class NordbayernBridge extends BridgeAbstract {
$item = array();
$article = getSimpleHTMLDOM($link);
$content = $article->find('div[class*=article-content]', 0);
if(is_null($content)) {
// If content is null its most likely a slideshow.
// we do not support slideshows right now as I (theScrabi)
// think there is to little informational value in these
// to actually add support to them.
return;
}
$item['uri'] = $link;
$item['title'] = $article->find('h1', 0)->innertext;
$item['content'] = '';