mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 17:45:40 +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',
|
||||
'exampleValue' => 'checked',
|
||||
'title' => 'Include Police Reports',
|
||||
],
|
||||
'hideNNPlus' => [
|
||||
'name' => 'Hide NN+ articles',
|
||||
'type' => 'checkbox',
|
||||
'exampleValue' => 'unchecked',
|
||||
'title' => 'Hide all paywall articles on NN'
|
||||
]
|
||||
]];
|
||||
|
||||
|
@ -153,9 +159,15 @@ class NordbayernBridge extends BridgeAbstract
|
|||
foreach ($main->find('article') as $article) {
|
||||
$url = $article->find('a', 0)->href;
|
||||
$url = urljoin(self::URI, $url);
|
||||
// exclude nn+ articles if desired
|
||||
if (
|
||||
!$this->getInput('hideNNPlus') ||
|
||||
!str_contains($url, 'www.nn.de')
|
||||
) {
|
||||
self::handleArticle($url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function collectData()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue