mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-29 08:20:15 +02:00
[ZeitBridge] Fix linting
This commit is contained in:
parent
4d12aa2a9e
commit
7bde7a56f9
1 changed files with 6 additions and 2 deletions
|
@ -87,7 +87,9 @@ class ZeitBridge extends FeedExpander
|
||||||
// remove known bad elements
|
// remove known bad elements
|
||||||
foreach (
|
foreach (
|
||||||
$article->find(
|
$article->find(
|
||||||
'aside, .visually-hidden, .carousel-container, #tickaroo-liveblog, .zplus-badge, .article-heading__container--podcast, .podcast-player__image, div[data-paywall], .js-embed-consent, script, nav, .article-flexible-toc__subheading-link, .faq-link'
|
'aside, .visually-hidden, .carousel-container, #tickaroo-liveblog, .zplus-badge,
|
||||||
|
.article-heading__container--podcast, .podcast-player__image, div[data-paywall],
|
||||||
|
.js-embed-consent, script, nav, .article-flexible-toc__subheading-link, .faq-link'
|
||||||
) as $bad
|
) as $bad
|
||||||
) {
|
) {
|
||||||
$bad->remove();
|
$bad->remove();
|
||||||
|
@ -110,7 +112,9 @@ class ZeitBridge extends FeedExpander
|
||||||
// authors
|
// authors
|
||||||
$authors = $article->find('*[itemtype*="schema.org/Person"]') ?? $article->find('.metadata__source');
|
$authors = $article->find('*[itemtype*="schema.org/Person"]') ?? $article->find('.metadata__source');
|
||||||
if ($authors) {
|
if ($authors) {
|
||||||
$item['author'] = implode(', ', array_map(function ($e) { return trim($e->plaintext); }, $authors));
|
$item['author'] = implode(', ', array_map(function ($e) {
|
||||||
|
return trim($e->plaintext);
|
||||||
|
}, $authors));
|
||||||
}
|
}
|
||||||
|
|
||||||
// header image
|
// header image
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue