[ie/youtube] Fix bug in `n` fixup

Authored by: bashonly
pull/12761/head
bashonly 4 months ago
parent 02deb64a7f
commit 74a2ee7508
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

@ -2229,6 +2229,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
code = global_var + '; ' + code
else:
self.write_debug('No global array variable found in player JS')
varname = 'dlp_wins'
return argnames, re.sub(
rf';\s*if\s*\(\s*typeof\s+[a-zA-Z0-9_$]+\s*===?\s*(?:(["\'])undefined\1|{re.escape(varname)}\[\d+\])\s*\)\s*return\s+{re.escape(argnames[0])};',
';', code)

Loading…
Cancel
Save