[FreeTelechargerBridge] Update to the new URL (#3856)

* [FreeTelechargerBridge] Update to the new URL

Website has changed URL and some design : this bridge is now adapted to
thoses changes

* [FreeTelechargerBridge] Fix example value

Example valuse seems to use an "old" template, switch to a newer example
that use the new template

* [FreeTelechargerBridge] Fix notice

Fix notice
This commit is contained in:
sysadminstory 2023-12-25 14:51:51 +01:00 committed by GitHub
parent 98dafb61ae
commit 9f163ab7c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@
class FreeTelechargerBridge extends BridgeAbstract
{
const NAME = 'Free-Telecharger';
const URI = 'https://www.free-telecharger.live/';
const URI = 'https://www.free-telecharger.art/';
const DESCRIPTION = 'Suivi de série sur Free-Telecharger';
const MAINTAINER = 'sysadminstory';
const PARAMETERS = [
@ -12,13 +12,16 @@ class FreeTelechargerBridge extends BridgeAbstract
'name' => 'URL de la série',
'type' => 'text',
'required' => true,
'title' => 'URL d\'une série sans le https://www.free-telecharger.live/',
'title' => 'URL d\'une série sans le https://www.free-telecharger.art/',
'pattern' => 'series.*\.html',
'exampleValue' => 'series-vf-hd/145458-the-last-of-us-saison-1-web-dl-720p.html'
'exampleValue' => 'series-vf-hd/151432-wolf-saison-1-complete-web-dl-720p.html'
],
]
];
const CACHE_TIMEOUT = 3600;
private string $showTitle;
private string $showTechDetails;
public function collectData()
{
$html = getSimpleHTMLDOM(self::URI . $this->getInput('url'));
@ -38,7 +41,7 @@ class FreeTelechargerBridge extends BridgeAbstract
// Get Episodes names and links
$episodes = $linksBlock->find('div[id=link]', 0)->find('font[color=#ff6600]');
$episodes = $linksBlock->find('div[id=link]', 0)->find('font[color=#e93100]');
$links = $linksBlock->find('div[id=link]', 0)->find('a');
foreach ($episodes as $index => $episode) {
@ -76,10 +79,10 @@ class FreeTelechargerBridge extends BridgeAbstract
public function detectParameters($url)
{
// Example: https://www.free-telecharger.live/series-vf-hd/145458-the-last-of-us-saison-1-web-dl-720p.html
// Example: https://www.free-telecharger.art/series-vf-hd/151432-wolf-saison-1-complete-web-dl-720p.html
$params = [];
$regex = '/^https:\/\/www.*\.free-telecharger\.live\/(series.*\.html)/';
$regex = '/^https:\/\/www.*\.free-telecharger\.art\/(series.*\.html)/';
if (preg_match($regex, $url, $matches) > 0) {
$params['context'] = 'Suivi de publication de série';
$params['url'] = urldecode($matches[1]);