Skip to content

Commit

Permalink
[NordbayernBridge] fill item categories if available (#4338)
Browse files Browse the repository at this point in the history
  • Loading branch information
swofl authored Nov 23, 2024
1 parent 086ef7f commit e3260ff
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 @@ -163,6 +163,13 @@ private function getArticle($link)
$item['content'] .= $this->getUseFullContent($content);
}

$categories = $article->find('[class=themen]', 0);
if ($categories) {
$item['categories'] = [];
foreach ($categories->find('a') as $category) {
$item['categories'][] = $category->innertext;
}
}

$article->clear();
return $item;
Expand Down

0 comments on commit e3260ff

Please sign in to comment.