1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-01 06:10:22 +02:00

[bridges] Define max items and clear caches

This commit is contained in:
logmanoriginal
2016-09-05 20:26:45 +02:00
parent f1fb527607
commit 2861a855e4
12 changed files with 43 additions and 25 deletions

View File

@@ -7,7 +7,7 @@ class NiceMatinBridge extends FeedExpander {
const DESCRIPTION = "Returns the 10 newest posts from NiceMatin (full text)";
public function collectData(){
$this->collectExpandableDatas(self::URI . 'derniere-minute/rss');
$this->collectExpandableDatas(self::URI . 'derniere-minute/rss', 10);
}
protected function parseItem($newsItem){
@@ -17,6 +17,8 @@ class NiceMatinBridge extends FeedExpander {
}
private function NiceMatinExtractContent($url) {
if($this->get_cached_time($url) <= strtotime('-24 hours'))
$this->remove_from_cache($url);
$html = $this->get_cached($url);
if(!$html)
return 'Could not acquire content from url: ' . $url . '!';