diff --git a/bridges/CoinDeskBridge.php b/bridges/CoinDeskBridge.php deleted file mode 100644 index 5dcb1c0..0000000 --- a/bridges/CoinDeskBridge.php +++ /dev/null @@ -1,56 +0,0 @@ -maintainer = "mitsukarenai"; - $this->name = "CoinDesk"; - $this->uri = "http://www.coindesk.com/"; - $this->description = "Returns the 5 newest posts from CoinDesk (full text)"; - $this->update = "2014-05-30"; - - } - - public function collectData(array $param){ - - function CoinDeskStripCDATA($string) { - $string = str_replace('', '', $string); - return $string; - } - function CoinDeskExtractContent($url) { - $html2 = $this->getSimpleHTMLDOM($url); - $text = $html2->find('div.single-content', 0)->innertext; - $text = strip_tags($text, '

'); - return $text; - } - $html = $this->getSimpleHTMLDOM('http://www.coindesk.com/feed/atom/') or $this->returnError('Could not request CoinDesk.', 404); - $limit = 0; - - foreach($html->find('entry') as $element) { - if($limit < 5) { - $item = new \Item(); - $item->title = CoinDeskStripCDATA($element->find('title', 0)->innertext); - $item->author = $element->find('author', 0)->plaintext; - $item->uri = $element->find('link', 0)->href; - $item->timestamp = strtotime($element->find('published', 0)->plaintext); - $item->content = CoinDeskExtractContent($item->uri); - $this->items[] = $item; - $limit++; - } - } - - } - - public function getName(){ - return 'CoinDesk'; - } - - public function getURI(){ - return 'http://www.coindesk.com/'; - } - - public function getCacheDuration(){ - return 1800; // 30min - } -} diff --git a/bridges/FSBridge.php b/bridges/FSBridge.php deleted file mode 100644 index cd212c3..0000000 --- a/bridges/FSBridge.php +++ /dev/null @@ -1,56 +0,0 @@ -maintainer = "qwertygc"; - $this->name = "Futurasciences"; - $this->uri = "http://www.futura-sciences.com"; - $this->description = "Returns the 5 newest posts from FS (full text)"; - $this->update = "03/11/2015"; - - } - - public function collectData(array $param){ - - function FS_StripCDATA($string) { - $string = str_replace('', '', $string); - return $string; - } - function FS_ExtractContent($url) { - $html2 = $this->getSimpleHTMLDOM($url); - $text = $html2->find('div.fiche-actualite', 0)->innertext; - $text = preg_replace('@]*?>.*?@si', '', $text); - return $text; - } - $html = $this->getSimpleHTMLDOM('http://www.futura-sciences.com/rss/actualites.xml') or $this->returnError('Could not request Futura Sciences.', 404); - $limit = 0; - - foreach($html->find('item') as $element) { - if($limit < 5) { - $item = new \Item(); - $item->title = FS_StripCDATA($element->find('title', 0)->innertext); - $item->uri = FS_StripCDATA($element->find('guid', 0)->plaintext); - $item->timestamp = strtotime($element->find('pubDate', 0)->plaintext); - $item->content = FS_ExtractContent($item->uri); - $this->items[] = $item; - $limit++; - } - } - - } - - public function getName(){ - return 'Futura Sciences'; - } - - public function getURI(){ - return 'http://www.futura-sciences.com/'; - } - - public function getCacheDuration(){ - return 3600; // 1 hour - // return 0; // 1 hour - } -} diff --git a/bridges/FrandroidBridge.php b/bridges/FrandroidBridge.php deleted file mode 100644 index 82bd62f..0000000 --- a/bridges/FrandroidBridge.php +++ /dev/null @@ -1,69 +0,0 @@ -maintainer = "Daiyousei"; - $this->name = "Frandroid"; - $this->uri = "http://www.frandroid.com/"; - $this->description = "Returns the RSS feed from Frandroid (full text articles)"; - $this->update = "2015-03-05"; - - } - - public function collectData(array $param) - { - - function FrandroidStripCDATA($string) - { - $string = str_replace('', '', $string); - return $string; - } - function FrandroidExtractContent($url) - { - $html2 = $this->getSimpleHTMLDOM($url); - $html3 = $html2->find('div.post-content', 0); - $html3->find('div.no-sidebar-ad-top', 0)->outertext = ''; - $ret = $html3->find('div.shortcode-container'); - foreach ($ret as $value) { - $value->outertext = ''; - } - - $html3->find('div#hrr-link', 0)->outertext = ''; - $text = $html3->innertext; - $text = strip_tags($text, '