From 6f8b93fb46a02d7c2b059be94ed1d9c8b8b4081a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Wed, 14 Sep 2016 13:31:43 +0200 Subject: [PATCH] [bridges] removed since they just parse the site feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/GuruMedBridge.php | 32 -------------------------- bridges/ZoneTelechargementBridge.php | 34 ---------------------------- 2 files changed, 66 deletions(-) delete mode 100644 bridges/GuruMedBridge.php delete mode 100644 bridges/ZoneTelechargementBridge.php diff --git a/bridges/GuruMedBridge.php b/bridges/GuruMedBridge.php deleted file mode 100644 index 0c4bf2c..0000000 --- a/bridges/GuruMedBridge.php +++ /dev/null @@ -1,32 +0,0 @@ -', '', $string); - return $string; - } - - public function collectData(){ - $html = $this->getSimpleHTMLDOM(self::URI.'feed') - or $this->returnServerError('Could not request Gurumed.'); - $limit = 0; - - foreach($html->find('item') as $element) { - if($limit < 5) { - $item = array(); - $item['title'] = $this->GurumedStripCDATA($element->find('title', 0)->innertext); - $item['uri'] = $this->GurumedStripCDATA($element->find('guid', 0)->plaintext); - $item['timestamp'] = strtotime($element->find('pubDate', 0)->plaintext); - $item['content'] = $this->GurumedStripCDATA(strip_tags($element->find('description', 0), '


')); - $this->items[] = $item; - $limit++; - } - } - } -} diff --git a/bridges/ZoneTelechargementBridge.php b/bridges/ZoneTelechargementBridge.php deleted file mode 100644 index ee54783..0000000 --- a/bridges/ZoneTelechargementBridge.php +++ /dev/null @@ -1,34 +0,0 @@ -You may specify a category found in RSS URLs, else main feed is selected.'; - - const PARAMETERS = array( array( - 'category'=>array('name'=>'Category') - )); - - public function collectData(){ - - function StripCDATA($string) { - $string = str_replace('', '', $string); - return $string; - } - - $url = $this->getURI().$this->getInput('category').'rss.xml'; - $html = $this->getSimpleHTMLDOM($url) or $this->returnServerError('Could not request Zone Telechargement: '.$url); - - foreach($html->find('item') as $element) { - $item = array(); - $item['title'] = $element->find('title', 0)->plaintext; - $item['uri'] = str_replace('http://', 'https://', $element->find('guid', 0)->plaintext); - $item['timestamp'] = strtotime($element->find('pubDate', 0)->plaintext); - $item['content'] = StripCDATA($element->find('description', 0)->innertext); - $this->items[] = $item; - $limit++; - } - } -}