diff options
author | oxamun <123496932+oxamun@users.noreply.github.com> | 2023-02-11 23:21:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-12 09:51:29 +0530 |
commit | 989f47b6315541989bb507f26b431d9586430995 (patch) | |
tree | 5b78259735e8c601a408bbaa3d68d777ea06e4fd | |
parent | 7d5f919bad07017f4b39b55725491b1e9717d47a (diff) | |
download | hypervideo-pre-989f47b6315541989bb507f26b431d9586430995.tar.lz hypervideo-pre-989f47b6315541989bb507f26b431d9586430995.tar.xz hypervideo-pre-989f47b6315541989bb507f26b431d9586430995.zip |
[extractor/tnaflix] Fix extractor (#6086)
Closes #6085
Authored by: oxamun, bashonly
-rw-r--r-- | yt_dlp/extractor/tnaflix.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/yt_dlp/extractor/tnaflix.py b/yt_dlp/extractor/tnaflix.py index 4482c8474..b2baf2e87 100644 --- a/yt_dlp/extractor/tnaflix.py +++ b/yt_dlp/extractor/tnaflix.py @@ -81,26 +81,27 @@ class TNAFlixNetworkBaseIE(InfoExtractor): display_id = video_id webpage = self._download_webpage(url, display_id) + inputs = self._hidden_inputs(webpage) + query = {} # check for MovieFap-style config cfg_url = self._proto_relative_url(self._html_search_regex( self._CONFIG_REGEX, webpage, 'flashvars.config', default=None, group='url'), 'http:') - query = {} - # check for TNAFlix-style config if not cfg_url: - inputs = self._hidden_inputs(webpage) - if inputs.get('vkey') and inputs.get('nkey'): - cfg_url = f'https://www.{host}.com/cdn/cdn.php' - query.update({ - 'file': inputs['vkey'], - 'key': inputs['nkey'], - 'VID': video_id, - 'premium': '1', - 'vip': '1', - 'alpha': '', - }) + cfg_url = inputs.get('config') + + # check for TNAFlix-style config + if not cfg_url and inputs.get('vkey') and inputs.get('nkey'): + cfg_url = f'http://cdn-fck.{host}.com/{host}/{inputs["vkey"]}.fid' + query.update({ + 'key': inputs['nkey'], + 'VID': video_id, + 'premium': '1', + 'vip': '1', + 'alpha': '', + }) formats, json_ld = [], {} |