1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-06-23 19:36:05 +02:00

[MozillaSecurityBridge] Limit items to 20 (#2287)

This commit is contained in:
Bockiii
2021-10-09 13:03:12 +02:00
committed by GitHub
parent ba5baaf7c9
commit 11be390e65

View File

@ -18,6 +18,10 @@ class MozillaSecurityBridge extends BridgeAbstract {
$articles = $html->find('div[id="main-content"] h2');
foreach ($articles as $element) {
//Limit total amount of requests
if(count($this->items) >= 20) {
break;
}
$item['title'] = $element->innertext;
$item['timestamp'] = strtotime($element->innertext);
$item['content'] = $element->next_sibling()->innertext;