maintainer = "pit-fgfjiudghdf"; $this->name = "Rue89"; $this->uri = "http://rue89.nouvelobs.com/"; $this->description = "Returns the 5 newest posts from Rue89 (full text)"; $this->update = "2015-01-30"; } public function collectData(array $param){ function Rue89StripCDATA($string) { $string = str_replace('', '', $string); return $string; } function Rue89ExtractContent($url) { $html2 = file_get_html($url); //$text = $html2->find('div[class=text]', 0)->innertext; foreach($html2->find('img') as $image) { $src = $image->getAttribute('data-src'); if($src) $image->src = $src; } $text = $html2->find('div.content', 0)->innertext; $text = str_replace('href="/', 'href="http://rue89.nouvelobs.com/', $text); $text = str_replace('src="/', 'src="http://rue89.nouvelobs.com/', $text); $text = preg_replace('@@si', '', $text); $text = strip_tags($text, '