returnError('Could not request Wikipedia EO.', 404); $element = $html->find('div[id=mf-tfa]', 0); // Link to article $link = $element->find('p', -2)->find('a', 0); $item = new \Item(); $item->uri = $host.$link->href; $item->title = $link->title; $item->content = str_replace('href="/', 'href="'.$host.'/', $element->innertext); $this->items[] = $item; } public function getName(){ return 'Wikipedia EO "Artikolo de la semajno"'; } public function getURI(){ return 'https://eo.wikipedia.org/wiki/Vikipedio:%C4%88efpa%C4%9Do'; } public function getCacheDuration(){ return 3600*12; // 12 hours } }