returnError('Could not request Bouffonduroi.', 404); $data = $html->find('div.article[itemscope=*]'); $Cnt = 0; foreach( $data as $element) { $item = new \Item(); $item->uri = $element->find('a', 0)->href; $item->title = 'Bouffonduroi - '.$element->find('a', 0)->plaintext; $item->content = $element->find('a', 0)->innertext; $img = $element->find('img', 0); if (isset($img)) { $item->content .= '
'.$img; } $video = $element->find('div.contenuArticle iframe', 0)->src; if (isset($video)) { $item->content .= '
Video !! '; } foreach($element->find('div.contenuArticle span') as $contentarticle) { $item->content .= '
'.$contentarticle->plaintext; } $this->items[] = $item; } } public function getName(){ return 'Bouffonduroi'; } public function getURI(){ return 'http://Bouffonduroi.over-blog.fr/'; } public function getCacheDuration(){ return 21600; // 6 hours } }