1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-17 22:02:09 +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

@@ -37,7 +37,7 @@ class DauphineLibereBridge extends FeedExpander {
$url = self::URI . $this->getInput('u') . '/rss';
}
$this->collectExpandableDatas($url);
$this->collectExpandableDatas($url, 10);
}
protected function parseItem($newsItem){
@@ -47,7 +47,9 @@ class DauphineLibereBridge extends FeedExpander {
}
private function ExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
if($this->get_cached_time($url) <= strtotime('-24 hours'))
$this->remove_from_cache($url);
$html2 = $this->get_cached($url);
$text = $html2->find('div.column', 0)->innertext;
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
return $text;