mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-25 12:55:43 +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');
|
throwServerException('Failed to parse Cybernews sitemap');
|
||||||
}
|
}
|
||||||
|
|
||||||
$articleCount = 0;
|
|
||||||
|
|
||||||
foreach ($sitemap->url as $entry) {
|
foreach ($sitemap->url as $entry) {
|
||||||
$url = trim((string) $entry->loc);
|
$url = trim((string) $entry->loc);
|
||||||
$lastmod = trim((string) $entry->lastmod);
|
$lastmod = trim((string) $entry->lastmod);
|
||||||
@ -61,7 +59,7 @@ class CybernewsBridge extends BridgeAbstract
|
|||||||
'content' => $this->fetchFullArticle($url),
|
'content' => $this->fetchFullArticle($url),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (++$articleCount >= self::MAX_ARTICLES) {
|
if (count($this->items) >= self::MAX_ARTICLES) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user