diff --git a/bridges/YoutubeBridge.php b/bridges/YoutubeBridge.php new file mode 100644 index 0000000..fac0c76 --- /dev/null +++ b/bridges/YoutubeBridge.php @@ -0,0 +1,36 @@ +returnError('Could not request Youtube.', 404); + + foreach($html->find('li.channels-content-item') as $element) { + $item = new \Item(); + $item->uri = 'https://www.youtube.com'.$element->find('a',0)->href; + $item->thumbnailUri = 'https:'.$element->find('img',0)->src; + $item->title = trim($element->find('h3',0)->plaintext); + $item->content = '
' . $item->title . ''; + $this->items[] = $item; + } + } + + public function getName(){ + return 'Youtube Bridge'; + } + + public function getURI(){ + return 'https://www.youtube.com/'; + } + + public function getCacheDuration(){ + return 21600; // 6 hours + } +}