Skip to content

Commit

Permalink
[ZeitBridge] Remove content from original feed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AlexanderS committed Sep 9, 2024
1 parent 358bebb commit bed569b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bridges/ZeitBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ private function parseArticle($item, $article)
}, $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) {
Expand Down

0 comments on commit bed569b

Please sign in to comment.