diff --git a/bridges/ABCTabsBridge.php b/bridges/ABCTabsBridge.php index 4fd24872..1dbe77f2 100644 --- a/bridges/ABCTabsBridge.php +++ b/bridges/ABCTabsBridge.php @@ -9,7 +9,6 @@ class ABCTabsBridge extends BridgeAbstract{ $this->name = "ABC Tabs Bridge"; $this->uri = "http://www.abc-tabs.com/"; $this->description = "Returns 22 newest tabs"; - $this->update = '2016-08-17'; } diff --git a/bridges/AcrimedBridge.php b/bridges/AcrimedBridge.php index fce0ce10..a347ed34 100644 --- a/bridges/AcrimedBridge.php +++ b/bridges/AcrimedBridge.php @@ -7,7 +7,6 @@ class AcrimedBridge extends RssExpander{ $this->name = "Acrimed Bridge"; $this->uri = "http://www.acrimed.org/"; $this->description = "Returns the newest articles."; - $this->update = "2016-08-09"; } diff --git a/bridges/AllocineFRBridge.php b/bridges/AllocineFRBridge.php index baaf4a1b..9799a70e 100644 --- a/bridges/AllocineFRBridge.php +++ b/bridges/AllocineFRBridge.php @@ -7,34 +7,21 @@ class AllocineFRBridge extends BridgeAbstract{ $this->name = "Allo Cine Bridge"; $this->uri = "http://www.allocine.fr"; $this->description = "Bridge for allocine.fr"; - $this->update = '2016-08-17'; - $this->parameters[] = - '[ - { - "name" : "category", - "identifier" : "category", - "type" : "list", - "required" : true, - "exampleValue" : "Faux Raccord", - "title" : "Select your category", - "values" : - [ - { - "name" : "Faux Raccord", - "value" : "faux-raccord" - }, - { - "name" : "Top 5", - "value" : "top-5" - }, - { - "name" : "Tueurs En Serie", - "value" : "tuers-en-serie" - } - ] - } - ]'; + $this->parameters[] = array( + 'category'=>array( + 'name'=>'category', + 'type'=>'list', + 'required'=>true, + 'exampleValue'=>'Faux Raccord', + 'title'=>'Select your category', + 'values'=>array( + 'Faux Raccord'=>'faux-raccord', + 'Top 5'=>'top-5', + 'Tueurs En Serie'=>'tuers-en-serie' + ) + ) + ); } public function collectData(array $params){ @@ -64,7 +51,7 @@ class AllocineFRBridge extends BridgeAbstract{ // Update bridge name to match selection $this->name .= ' : ' . $category; - $html = $this->getSimpleTMLOM($this->uri) or $this->returnServerError("Could not request {$this->uri}!"); + $html = $this->getSimpleHTMLDOM($this->uri) or $this->returnServerError("Could not request {$this->uri}!"); foreach($html->find('figure.media-meta-fig') as $element) { diff --git a/bridges/AnimeUltimeBridge.php b/bridges/AnimeUltimeBridge.php index 7eae61c1..5c25a7dc 100644 --- a/bridges/AnimeUltimeBridge.php +++ b/bridges/AnimeUltimeBridge.php @@ -9,38 +9,19 @@ class AnimeUltimeBridge extends BridgeAbstract { $this->name = 'Anime-Ultime'; $this->uri = 'http://www.anime-ultime.net/'; $this->description = 'Returns the 10 newest releases posted on Anime-Ultime'; - $this->update = '2016-08-17'; - $this->parameters[] = - '[ - { - "name" : "Type", - "type" : "list", - "identifier" : "type", - "values" : - [ - { - "name" : "Everything", - "value" : "" - - }, - { - "name" : "Anime", - "value" : "A" - - }, - { - "name" : "Drama", - "value" : "D" - }, - { - "name" : "Tokusatsu", - "value" : "T" - - } - ] - } - ]'; + $this->parameters[] = array( + 'type'=>array( + 'name'=>'Type', + 'type'=>'list', + 'values'=>array( + 'Everything'=>'', + 'Anime'=>'A', + 'Drama'=>'D', + 'Tokusatsu'=>'T' + ) + ) + ); } public function collectData(array $param) { diff --git a/bridges/ArstechnicaBridge.php b/bridges/ArstechnicaBridge.php index a0fcb54c..c3f72447 100644 --- a/bridges/ArstechnicaBridge.php +++ b/bridges/ArstechnicaBridge.php @@ -3,67 +3,68 @@ #error_reporting(E_ALL); class ArstechnicaBridge extends BridgeAbstract { - public function loadMetadatas() { + public function loadMetadatas() { - $this->maintainer = "prysme"; - $this->name = "ArstechnicaBridge"; - $this->uri = "http://arstechnica.com"; - $this->description = "The PC enthusiast's resource. Power users and the tools they love, without computing religion"; - $this->update = '2016-08-17'; + $this->maintainer = "prysme"; + $this->name = "ArstechnicaBridge"; + $this->uri = "http://arstechnica.com"; + $this->description = "The PC enthusiast's resource. Power users and the tools they love, without computing religion"; - } + } - public function collectData(array $param) { - function StripWithDelimiters($string, $start, $end) { - while (strpos($string, $start) !== false) { - $section_to_remove = substr($string, strpos($string, $start)); - $section_to_remove = substr($section_to_remove, 0, strpos($section_to_remove, $end) + strlen($end)); - $string = str_replace($section_to_remove, '', $string); - } return $string; - } - function StripCDATA($string) { - $string = str_replace('', '', $string); - return $string; - } + function StripWithDelimiters($string, $start, $end) { + while (strpos($string, $start) !== false) { + $section_to_remove = substr($string, strpos($string, $start)); + $section_to_remove = substr($section_to_remove, 0, strpos($section_to_remove, $end) + strlen($end)); + $string = str_replace($section_to_remove, '', $string); + } return $string; + } - function ExtractContent($url) { - #echo $url; - $html2 = getSimpleHTMLDOM($url); + function StripCDATA($string) { + $string = str_replace('', '', $string); + return $string; + } - $text = $html2->find("section[id='article-guts']", 0); + function ExtractContent($url) { + #echo $url; + $html2 = $this->getSimpleHTMLDOM($url); + + $text = $html2->find("section[id='article-guts']", 0); /*foreach ($text->find('