1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-06 16:46:30 +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

@@ -6,7 +6,7 @@ class CADBridge extends FeedExpander {
const DESCRIPTION = "Returns the newest articles.";
public function collectData(){
$this->collectExpandableDatas('http://cdn2.cad-comic.com/rss.xml');
$this->collectExpandableDatas('http://cdn2.cad-comic.com/rss.xml', 10);
}
protected function parseItem($newsItem){
@@ -16,6 +16,8 @@ class CADBridge extends FeedExpander {
}
private function CADExtractContent($url) {
if($this->get_cached_time($url) <= strtotime('-24 hours'))
$this->remove_from_cache($url);
$html3 = $this->get_cached($url);
// The request might fail due to missing https support or wrong URL