mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-12 11:34:09 +02:00
[bridges] Define max items and clear caches
This commit is contained in:
@@ -7,7 +7,7 @@ class NextInpactBridge extends FeedExpander {
|
||||
const DESCRIPTION = "Returns the newest articles.";
|
||||
|
||||
public function collectData(){
|
||||
$this->collectExpandableDatas(self::URI . 'rss/news.xml');
|
||||
$this->collectExpandableDatas(self::URI . 'rss/news.xml', 10);
|
||||
}
|
||||
|
||||
protected function parseItem($newsItem){
|
||||
@@ -17,6 +17,8 @@ class NextInpactBridge extends FeedExpander {
|
||||
}
|
||||
|
||||
private function ExtractContent($url) {
|
||||
if($this->get_cached_time($url) <= strtotime('-24 hours'))
|
||||
$this->remove_from_cache($url);
|
||||
$html2 = $this->get_cached($url);
|
||||
$text = '<p><em>'.$html2->find('span.sub_title', 0)->innertext.'</em></p>'
|
||||
.'<p><img src="'.$html2->find('div.container_main_image_article', 0)->find('img.dedicated',0)->src.'" alt="-" /></p>'
|
||||
|
Reference in New Issue
Block a user