mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-01 14:24:39 +03:00
hide Nordbayern+ articles (#3094)
This commit is contained in:
parent
0a2e31e1f7
commit
79f6ec5733
1 changed files with 13 additions and 1 deletions
|
@ -38,6 +38,12 @@ class NordbayernBridge extends BridgeAbstract
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'exampleValue' => 'checked',
|
'exampleValue' => 'checked',
|
||||||
'title' => 'Include Police Reports',
|
'title' => 'Include Police Reports',
|
||||||
|
],
|
||||||
|
'hideNNPlus' => [
|
||||||
|
'name' => 'Hide NN+ articles',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'exampleValue' => 'unchecked',
|
||||||
|
'title' => 'Hide all paywall articles on NN'
|
||||||
]
|
]
|
||||||
]];
|
]];
|
||||||
|
|
||||||
|
@ -153,7 +159,13 @@ class NordbayernBridge extends BridgeAbstract
|
||||||
foreach ($main->find('article') as $article) {
|
foreach ($main->find('article') as $article) {
|
||||||
$url = $article->find('a', 0)->href;
|
$url = $article->find('a', 0)->href;
|
||||||
$url = urljoin(self::URI, $url);
|
$url = urljoin(self::URI, $url);
|
||||||
self::handleArticle($url);
|
// exclude nn+ articles if desired
|
||||||
|
if (
|
||||||
|
!$this->getInput('hideNNPlus') ||
|
||||||
|
!str_contains($url, 'www.nn.de')
|
||||||
|
) {
|
||||||
|
self::handleArticle($url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue