From 11be390e65cea495f88b26d7f4f077e69487cbfa Mon Sep 17 00:00:00 2001 From: Bockiii Date: Sat, 9 Oct 2021 13:03:12 +0200 Subject: [PATCH] [MozillaSecurityBridge] Limit items to 20 (#2287) --- bridges/MozillaSecurityBridge.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bridges/MozillaSecurityBridge.php b/bridges/MozillaSecurityBridge.php index 1e7dc316..8abe4a13 100644 --- a/bridges/MozillaSecurityBridge.php +++ b/bridges/MozillaSecurityBridge.php @@ -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;