From 78050972f4d3ba4bd776a1a1a8c1848dac276f89 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sun, 4 Sep 2016 13:32:58 +0200 Subject: [PATCH] [Les400Culs] Use internal RSS 2.0 parser --- bridges/Les400CulsBridge.php | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/bridges/Les400CulsBridge.php b/bridges/Les400CulsBridge.php index df59e5be..972909a3 100644 --- a/bridges/Les400CulsBridge.php +++ b/bridges/Les400CulsBridge.php @@ -1,35 +1,19 @@ collectExpandableDatas(self::URI.'feeds/'); + $this->collectExpandableDatas(self::URI . 'feeds/'); } - protected function parseItem($newsItem) { - $item = array(); - $item['title'] = trim((string) $newsItem->title); - $this->debugMessage("browsing item ".var_export($newsItem, true)); - if(empty($newsItem->guid)) { - $item['uri'] = (string) $newsItem->link; - } else { - $item['uri'] = (string) $newsItem->guid; - } - // now load that uri from cache - $this->debugMessage("now loading page ".$item['uri']); -// $articlePage = $this->get_cached($item['uri']); - -// $content = $articlePage->find('.post-container', 0); - $item['content'] = (string) $newsItem->description; - $item['author'] = (string) $newsItem->author; - $item['timestamp'] = $this->RSS_2_0_time_to_timestamp($newsItem); - return $item; + protected function parseItem($newsItem){ + return $this->parseRSS_2_0_Item($newsItem); } + public function getCacheDuration(){ return 7200; // 2h hours }