[HeiseBridge] Properly extract authors (#2466)

This commit is contained in:
Mynacol 2022-03-05 19:51:03 +01:00 committed by GitHub
parent 9564e9291f
commit cbef3b3360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -53,8 +53,9 @@ class HeiseBridge extends FeedExpander {
}
private function addArticleToItem($item, $article) {
if($author = $article->find('[itemprop="author"]', 0))
$item['author'] = $author->plaintext;
$authors = $article->find('.a-creator__names', 0)->find('.a-creator__name');
if ($authors)
$item['author'] = implode(', ', array_map(function ($e) { return $e->plaintext; }, $authors ));
$content = $article->find('div[class*="article-content"]', 0);