0
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-24 20:38:36 +00:00

[CybernewsBridge] refactor

This commit is contained in:
tillcash 2025-08-11 09:53:30 +05:30 committed by GitHub
parent 7eddceaa14
commit 3c8d9d7b9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,8 +21,6 @@ class CybernewsBridge extends BridgeAbstract
throwServerException('Failed to parse Cybernews sitemap');
}
$articleCount = 0;
foreach ($sitemap->url as $entry) {
$url = trim((string) $entry->loc);
$lastmod = trim((string) $entry->lastmod);
@ -61,7 +59,7 @@ class CybernewsBridge extends BridgeAbstract
'content' => $this->fetchFullArticle($url),
];
if (++$articleCount >= self::MAX_ARTICLES) {
if (count($this->items) >= self::MAX_ARTICLES) {
break;
}
}