mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[youtube] fix for new base.js (close #823)
This commit is contained in:
parent
371d5f2fed
commit
12465a6a30
@ -51,9 +51,10 @@ class YouTube(VideoExtractor):
|
||||
code = re.sub(r'(\w+).split\(""\)', r'list(\1)', code)
|
||||
return code
|
||||
|
||||
js = js.replace('\n', ' ')
|
||||
f1 = match1(js, r'\w+\.sig\|\|([$\w]+)\(\w+\.\w+\)')
|
||||
f1def = match1(js, r'function %s(\(\w+\)\{[^\{]+\})' % re.escape(f1)) or \
|
||||
match1(js, r'var %s=function(\(\w+\)\{[^\{]+\})' % re.escape(f1))
|
||||
match1(js, r'\W%s=function(\(\w+\)\{[^\{]+\})' % re.escape(f1))
|
||||
f1def = re.sub(r'([$\w]+\.)([$\w]+\(\w+,\d+\))', r'\2', f1def)
|
||||
f1def = 'function %s%s' % (re.escape(f1), f1def)
|
||||
code = tr_js(f1def)
|
||||
|
Loading…
Reference in New Issue
Block a user