mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-21 17:15:25 +03:00
[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:
parent
664436c5f4
commit
56994b3b5c
1 changed files with 8 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue