[NordbayernBridge] fill item categories if available (#4338)

This commit is contained in:
Sebastian Wolf 2024-11-23 19:19:20 +01:00 committed by GitHub
parent 086ef7f8a7
commit e3260ff529
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -163,6 +163,13 @@ class NordbayernBridge extends BridgeAbstract
$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;