[extractor/tnaflix] Fix extractor (#6086)

Closes #6085
Authored by: oxamun, bashonly
This commit is contained in:
oxamun 2023-02-11 23:21:29 -05:00 committed by GitHub
parent 7d5f919bad
commit 989f47b631
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,20 +81,21 @@ def _real_extract(self, url):
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 = {}
if not cfg_url:
cfg_url = inputs.get('config')
# 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'
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({
'file': inputs['vkey'],
'key': inputs['nkey'],
'VID': video_id,
'premium': '1',