1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-07 00:56:34 +02:00

refactor: FeedExpander::parseItem() descendants (#3744)

This commit is contained in:
Dag
2023-10-13 00:25:34 +02:00
committed by GitHub
parent 9bda9e246a
commit 382648fc22
46 changed files with 314 additions and 281 deletions

View File

@@ -43,9 +43,9 @@ class CNETFranceBridge extends FeedExpander
$this->collectExpandableDatas('https://www.cnetfrance.fr/feeds/rss/news/');
}
protected function parseItem($feedItem)
protected function parseItem($item)
{
$item = parent::parseItem($feedItem);
$item = parent::parseItem($item);
foreach ($this->bannedTitle as $term) {
if (preg_match('/' . $term . '/mi', $item['title']) === 1) {
@@ -54,8 +54,7 @@ class CNETFranceBridge extends FeedExpander
}
foreach ($this->bannedURL as $term) {
$preg_match = preg_match('#' . $term . '#mi', $item['uri']);
if ($preg_match === 1) {
if (preg_match('#' . $term . '#mi', $item['uri'])) {
return null;
}
}