From 7740dbfcc95e9a2f3537066c927e3da48d96bf49 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 3 Aug 2016 12:50:24 +0200 Subject: [PATCH] [Frandroid] remove bridge: website supported by WordPress bridge --- bridges/FrandroidBridge.php | 69 ------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 bridges/FrandroidBridge.php diff --git a/bridges/FrandroidBridge.php b/bridges/FrandroidBridge.php deleted file mode 100644 index 8b1625c9..00000000 --- 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->file_get_html($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, '

      '); - return $text; - } - $html = $this->file_get_html('http://feeds.feedburner.com/Frandroid?format=xml') or $this->returnError('Could not request Frandroid.', 404); - $limit = 0; - - foreach ($html->find('item') as $element) { - if ($limit < 5) { - $item = new \Item(); - $item->title = FrandroidStripCDATA($element->find('title', 0)->innertext); - $item->uri = FrandroidStripCDATA($element->find('guid', 0)->plaintext); - $item->timestamp = strtotime($element->find('pubDate', 0)->plaintext); - $item->content = FrandroidExtractContent($item->uri); - $this->items[] = $item; - $limit++; - } - } - - } - - public function getName() - { - return 'Frandroid'; - } - - public function getURI() - { - return 'http://www.frandroid.com/'; - } - - public function getCacheDuration() - { - return 300; // 5min - } -}