From b4b5340b7ee22a6d7098c70794532ed8864fad81 Mon Sep 17 00:00:00 2001 From: sysadminstory Date: Mon, 22 Oct 2018 19:22:02 +0200 Subject: [PATCH] [ZoneTelechargementBridge] Make the bridge more robust to URL change (#881) Using the classical www.zone-telechargement1.org as base URL, the bridge will always be redirected to the actual wwX.zone-telechargement1.org final URL. This makes the bridge more robust to URL changes. --- bridges/ZoneTelechargementBridge.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bridges/ZoneTelechargementBridge.php b/bridges/ZoneTelechargementBridge.php index 81539633..609ffc11 100644 --- a/bridges/ZoneTelechargementBridge.php +++ b/bridges/ZoneTelechargementBridge.php @@ -1,7 +1,7 @@ true, 'title' => 'URL d\'une série sans le https://ww4.zone-telechargement1.org/', 'exampleValue' => 'telecharger-series/31079-halt-and-catch-fire-saison-4-french-hd720p.html' - ) ) - ); + ) + ); public function collectData(){ $html = getSimpleHTMLDOM(self::URI . $this->getInput('url')) @@ -58,7 +58,7 @@ class ZoneTelechargementBridge extends BridgeAbstract { } } - public function getName(){ + public function getName() { switch($this->queriedContext) { case 'Suivre la publication des épisodes d\'une série en cours de diffusion': return $this->showTitle . ' - ' . self::NAME; @@ -68,8 +68,7 @@ class ZoneTelechargementBridge extends BridgeAbstract { } } - private function findLinkHoster($element) - { + private function findLinkHoster($element) { // The hoster name is one level higher than the link tag : get the parent element $element = $element->parent(); //echo "PARENT : $element \n";