From 9105523818270cadb7ad90a3b1ea7e6f18d2dc54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergey=20M=E2=80=A4?= Date: Sat, 25 Nov 2017 23:13:17 +0700 Subject: [PATCH] [empflix] Fix extractrion --- youtube_dl/extractor/tnaflix.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/tnaflix.py b/youtube_dl/extractor/tnaflix.py index 9f47ce2aa..c4ead1fcd 100644 --- a/youtube_dl/extractor/tnaflix.py +++ b/youtube_dl/extractor/tnaflix.py @@ -21,6 +21,8 @@ class TNAFlixNetworkBaseIE(InfoExtractor): r'flashvars\.config\s*=\s*escape\("([^"]+)"', r']+name="config\d?" value="([^"]+)"', ] + _HOST = 'tna' + _VKEY_SUFFIX = '' _TITLE_REGEX = r']+name="title" value="([^"]+)"' _DESCRIPTION_REGEX = r']+name="description" value="([^"]+)"' _UPLOADER_REGEX = r']+name="username" value="([^"]+)"' @@ -81,8 +83,8 @@ class TNAFlixNetworkBaseIE(InfoExtractor): if not cfg_url: inputs = self._hidden_inputs(webpage) - cfg_url = ('https://cdn-fck.tnaflix.com/tnaflix/%s.fid?key=%s&VID=%s&premium=1&vip=1&alpha' - % (inputs['vkey'], inputs['nkey'], video_id)) + cfg_url = ('https://cdn-fck.%sflix.com/%sflix/%s%s.fid?key=%s&VID=%s&premium=1&vip=1&alpha' + % (self._HOST, self._HOST, inputs['vkey'], self._VKEY_SUFFIX, inputs['nkey'], video_id)) cfg_xml = self._download_xml( cfg_url, display_id, 'Downloading metadata', @@ -240,6 +242,8 @@ class TNAFlixIE(TNAFlixNetworkBaseIE): class EMPFlixIE(TNAFlixNetworkBaseIE): _VALID_URL = r'https?://(?:www\.)?empflix\.com/videos/(?P.+?)-(?P[0-9]+)\.html' + _HOST = 'emp' + _VKEY_SUFFIX = '-1' _UPLOADER_REGEX = r']+class="infoTitle"[^>]*>Uploaded By:(.+?)' _TESTS = [{ -- 2.39.5