1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-08 04:02:40 +01:00

Merge pull request #4338 from t0mm0/x-minus-fix

[xminus] update tkn extraction regex
This commit is contained in:
Philipp Hagemeister 2014-11-30 17:11:05 +01:00
commit 283ac8d592

View File

@ -50,7 +50,7 @@ def _real_extract(self, url):
webpage, 'view count', fatal=False)) webpage, 'view count', fatal=False))
enc_token = self._html_search_regex( enc_token = self._html_search_regex(
r'data-mt="(.*?)"', webpage, 'enc_token') r'minus_track\.tkn="(.+?)"', webpage, 'enc_token')
token = ''.join( token = ''.join(
c if pos == 3 else compat_chr(compat_ord(c) - 1) c if pos == 3 else compat_chr(compat_ord(c) - 1)
for pos, c in enumerate(reversed(enc_token))) for pos, c in enumerate(reversed(enc_token)))