mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
[MozillaSecurityBridge] Limit items to 20 (#2287)
This commit is contained in:
parent
ba5baaf7c9
commit
11be390e65
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue