collectExpandableDatas(self::URI . 'rss'); } protected function parseItem($newsItem){ $item = $this->parseRSS_2_0_Item($newsItem); $item['content'] = $this->LeJournalDuGeekExtractContent($item['uri']); return $item; } private function LeJournalDuGeekExtractContent($url) { $articleHTMLContent = $this->get_cached($url); $text = $articleHTMLContent->find('div.post-content', 0)->innertext; foreach($articleHTMLContent->find('a.more') as $element) { if ($element->innertext == "Source") { $text = $text . '

Source : ' . $element->href . '

'; break; } } foreach($articleHTMLContent->find('iframe') as $element) { if (preg_match("/youtube/i", $element->src)) { $text = $text . '// An IFRAME to Youtube was included in the article: ' . $element->src . '
'; } } $text = preg_replace('#(.*?)#is', '', $text); $text = strip_tags($text, '



  • '); return $text; } public function getCacheDuration(){ return 1800; // 30min } }