diff --git a/CollegeDeFranceBridge.php b/CollegeDeFranceBridge.php new file mode 100644 index 00000000..d2fe5bb8 --- /dev/null +++ b/CollegeDeFranceBridge.php @@ -0,0 +1,35 @@ +returnError('Could not request CollegeDeFrance.', 404); + $limit = 0; + foreach($html->find('li.audio') as $element) { + if($limit < 10) { + $item = new \Item(); + $item->title = $element->find('span.title', 0)->plaintext; + $item->timestamp = strtotime($element->find('span.date', 0)->plaintext); + $item->content = $element->find('span.lecturer', 0)->innertext . ' - ' . $element->find('span.title', 0)->innertext; + $item->uri = $element->find('a', 0)->href; + $this->items[] = $item; + $limit++; + } + } + + } + public function getName(){ + return 'CollegeDeFrance'; + } + public function getURI(){ + return 'http://www.college-de-france.fr/'; + } + public function getCacheDuration(){ + return 3600; // 1 hour + } +}