[ZeitBridge] Remove content from original feed (#4260)

The original feed contains a small version of the header image and
the summary or a literal "None". The header image is already added, but
the original content was kept. This removes the original content and
adds the summary if it exists.
This commit is contained in:
Alexander Sulfrian 2024-10-17 08:47:44 +02:00 committed by GitHub
parent 664436c5f4
commit 56994b3b5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -117,6 +117,14 @@ class ZeitBridge extends FeedExpander
}, $authors));
}
$item['content'] = '';
// summary
$summary = $article->find('.summary');
if ($summary) {
$item['content'] .= implode('', $summary);
}
// header image
$headerimg = $article->find('*[data-ct-row="headerimage"]', 0) ?? $article->find('.article-header', 0) ?? $article->find('header', 0);
if ($headerimg) {