Skip to content

Commit

Permalink
[NordbayernBridge] Exclude slideshows when handling articles (#2117)
Browse files Browse the repository at this point in the history
  • Loading branch information
theScrabi authored May 19, 2021
1 parent e8d241e commit 28aaf59
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bridges/NordbayernBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ private function handleArticle($link) {
$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'] = '';
Expand Down

0 comments on commit 28aaf59

Please sign in to comment.