diff --git a/bridges/MalikiBridge.php b/bridges/MalikiBridge.php new file mode 100644 index 00000000..bda2708c --- /dev/null +++ b/bridges/MalikiBridge.php @@ -0,0 +1,38 @@ +returnError('Could not request Maliki.', 404); + + foreach($html->find('div.boite_strip') as $element) { + if(!empty($element->find('a',0)->href)) { + $item = new \Item(); + $item->uri = 'http://www.maliki.com/'.$element->find('a',0)->href; + $item->thumbnailUri = 'http://www.maliki.com/'.$element->find('img',0)->src; + $item->title = $element->find('img',0)->title; + $item->timestamp = strtotime(str_replace('/', '-', $element->find('span.stylepetit', 0)->innertext)); + $item->content = ''; + $this->items[] = $item; + } + } + } + + public function getName(){ + return 'Maliki'; + } + + public function getURI(){ + return 'http://www.maliki.com/'; + } + + public function getCacheDuration(){ + return 86400; // 24 hours + } +}