fixed authors and added categories for HeiseBridge (#3376)

This commit is contained in:
Tone 2023-05-07 12:33:45 +02:00 committed by GitHub
parent 887f4bbe15
commit ec091fb747
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -161,7 +161,7 @@ class HeiseBridge extends FeedExpander
$headerElements = $header->find('p, figure img, noscript img');
$item['content'] = implode('', $headerElements);
$authors = $header->find('.a-creator__names .a-creator__name');
$authors = $header->find('.creator__names .creator__name');
if ($authors) {
$item['author'] = implode(', ', array_map(function ($e) {
return $e->plaintext;
@ -169,6 +169,11 @@ class HeiseBridge extends FeedExpander
}
}
$categories = $article->find('.article-footer__topics ul.topics li.topics__item');
foreach ($categories as $category) {
$item['categories'][] = trim($category->plaintext);
}
$content = $article->find('.article-content', 0);
if ($content) {
$contentElements = $content->find(