mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-05 09:09:37 +00:00
parent
52af2ae34c
commit
314d4c7a3f
@ -80,22 +80,25 @@ class HeiseBridge extends FeedExpander
|
||||
$article = str_get_html($article->outertext);
|
||||
|
||||
$header = $article->find('header.a-article-header', 0);
|
||||
$headerElements = $header->find('p, a-img img, figure img');
|
||||
$item['content'] = implode('', $headerElements);
|
||||
if ($header) {
|
||||
$headerElements = $header->find('p, a-img img, figure img');
|
||||
$item['content'] = implode('', $headerElements);
|
||||
|
||||
$authors = $header->find('.a-creator__names .a-creator__name');
|
||||
if ($authors) {
|
||||
$item['author'] = implode(', ', array_map(function ($e) {
|
||||
return $e->plaintext;
|
||||
}, $authors));
|
||||
$authors = $header->find('.a-creator__names .a-creator__name');
|
||||
if ($authors) {
|
||||
$item['author'] = implode(', ', array_map(function ($e) {
|
||||
return $e->plaintext;
|
||||
}, $authors));
|
||||
}
|
||||
}
|
||||
|
||||
$content = $article->find('.article-content', 0);
|
||||
$contentElements = $content->find(
|
||||
'p, h3, ul, table, pre, a-img img, a-bilderstrecke h2, a-bilderstrecke figure, a-bilderstrecke figcaption'
|
||||
);
|
||||
$item['content'] .= implode('', $contentElements);
|
||||
|
||||
if ($content) {
|
||||
$contentElements = $content->find(
|
||||
'p, h3, ul, table, pre, a-img img, a-bilderstrecke h2, a-bilderstrecke figure, a-bilderstrecke figcaption'
|
||||
);
|
||||
$item['content'] .= implode('', $contentElements);
|
||||
}
|
||||
foreach ($article->find('a-img img, a-bilderstrecke img, figure img') as $img) {
|
||||
$item['enclosures'][] = $img->src;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user