Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZoneTelechargement] Update unprotected URL and Feed URL #2065

Merged
merged 2 commits into from
Apr 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion bridges/ZoneTelechargementBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ZoneTelechargementBridge extends BridgeAbstract {
);

// This is an URL that is not protected by robot protection for Direct Download
const UNPROTECTED_URI = 'https://www.zt-za.com/';
const UNPROTECTED_URI = 'https://www.zone-telechargement.net/';

// This is an URL that is not protected by robot protection for Streaming Links
const UNPROTECTED_URI_STREAMING = 'https://zone-telechargement.stream/';
Expand Down Expand Up @@ -142,6 +142,16 @@ public function getName() {
}
}

public function getURI() {
switch($this->queriedContext) {
case 'Suivre la publication des épisodes d\'une série en cours de diffusion':
return self::URI . $this->getInput('url');
break;
default:
return self::URI;
}
}

private function findLinkHoster($element) {
// The hoster name is one level higher than the link tag : get the parent element
$element = $element->parent();
Expand Down