mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[MozillaSecurityBridge] Limit items to 20 (#2287)
This commit is contained in:
parent
ba5baaf7c9
commit
11be390e65
@ -18,6 +18,10 @@ class MozillaSecurityBridge extends BridgeAbstract {
|
|||||||
$articles = $html->find('div[id="main-content"] h2');
|
$articles = $html->find('div[id="main-content"] h2');
|
||||||
|
|
||||||
foreach ($articles as $element) {
|
foreach ($articles as $element) {
|
||||||
|
//Limit total amount of requests
|
||||||
|
if(count($this->items) >= 20) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
$item['title'] = $element->innertext;
|
$item['title'] = $element->innertext;
|
||||||
$item['timestamp'] = strtotime($element->innertext);
|
$item['timestamp'] = strtotime($element->innertext);
|
||||||
$item['content'] = $element->next_sibling()->innertext;
|
$item['content'] = $element->next_sibling()->innertext;
|
||||||
|
Loading…
Reference in New Issue
Block a user