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:
parent
7eddceaa14
commit
3c8d9d7b9b
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user