Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtractorError: Unsupported JS expression - Failed to Extract Audio #23825

Closed
byteshiva opened this issue Jan 24, 2020 · 1 comment
Closed

ExtractorError: Unsupported JS expression - Failed to Extract Audio #23825

byteshiva opened this issue Jan 24, 2020 · 1 comment

Comments

@byteshiva
Copy link

@byteshiva byteshiva commented Jan 24, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.01.24
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

➜ youtube-dl --version 
2020.01.01

youtube-dl --verbose https://www.youtube.com/watch?v=0g6lDwNrsns -f bestaudio 
[debug] System config: []
[debug] User config: [u'-x', u'--no-mtime', u'-o', u'~/experiments/bots/telegrambot/audios/%(title)s.%(ext)s']
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://www.youtube.com/watch?v=0g6lDwNrsns', u'-f', u'bestaudio']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.01.01
[debug] Python version 2.7.17 (CPython) - Linux-5.3.0-29-generic-x86_64-with-Ubuntu-19.10-eoan
[debug] exe versions: avconv 12.3, avprobe 12.3, ffmpeg 4.1.4-1build2, ffprobe 4.1.4-1build2, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 0g6lDwNrsns: Downloading webpage
[youtube] 0g6lDwNrsns: Downloading video info webpage
[youtube] {18} signature length 105, html5 player vfl7lL1_p
[youtube] 0g6lDwNrsns: Downloading player https://www.youtube.com/yts/jsbin/player_ias-vfl7lL1_p/en_US/base.js
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1384, in _decrypt_signature
    video_id, player_url, s
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1297, in _extract_signature_function
    cache_res = res(test_string)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1360, in <lambda>
    return lambda s: initial_function([s])
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 258, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 92, in interpret_expression
    m.group('expr'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 211, in interpret_expression
    raise ExtractorError('Unsupported JS expression %r' % expr)
ExtractorError: Unsupported JS expression u'[function(c,d){d=(d'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
 (caused by ExtractorError(u"Unsupported JS expression u'[function(c,d){d=(d'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1384, in _decrypt_signature
    video_id, player_url, s
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1297, in _extract_signature_function
    cache_res = res(test_string)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1360, in <lambda>
    return lambda s: initial_function([s])
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 258, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 92, in interpret_expression
    m.group('expr'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 211, in interpret_expression
    raise ExtractorError('Unsupported JS expression %r' % expr)
ExtractorError: Unsupported JS expression u'[function(c,d){d=(d'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 796, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 2047, in _real_extract
    encrypted_sig, video_id, player_url, age_gate)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1394, in _decrypt_signature
    'Signature extraction failed: ' + tb, cause=e)
ExtractorError: Signature extraction failed: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1384, in _decrypt_signature
    video_id, player_url, s
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1297, in _extract_signature_function
    cache_res = res(test_string)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1360, in <lambda>
    return lambda s: initial_function([s])
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 258, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 92, in interpret_expression
    m.group('expr'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/jsinterp.py", line 211, in interpret_expression
    raise ExtractorError('Unsupported JS expression %r' % expr)
ExtractorError: Unsupported JS expression u'[function(c,d){d=(d'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
 (caused by ExtractorError(u"Unsupported JS expression u'[function(c,d){d=(d'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

I'm trying to extract audio from youtube link using youtube-dl --version - 2020.01.01. Detailed log available above.

@byteshiva
Copy link
Author

@byteshiva byteshiva commented Jan 24, 2020

Thanks @remitamine

This issue got resolved by upgrading youtube-dl --version to 2020.01.24.
Here is the complete log for reference.

Upgrade youtube-dl version to 202001.24 and extract audio

➜ sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     3    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     3    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
100   599    0   599    0     0    166      0 --:--:--  0:00:03 --:--:--  1293
100 1706k  100 1706k    0     0   111k      0  0:00:15  0:00:15 --:--:--  187k
/tmp took 15s 
➜ sudo chmod a+rx /usr/local/bin/youtube-dl
/tmp 
➜ youtube-dl --version 
2020.01.24
/tmp took 2s 
➜ youtube-dl --verbose https://www.youtube.com/watch?v=0g6lDwNrsns -f bestaudio 
[debug] System config: []
[debug] User config: ['-x', '--no-mtime', '-o', '~/audios/%(title)s.%(ext)s']
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=0g6lDwNrsns', '-f', 'bestaudio']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.01.24
[debug] Python version 3.8.0 (CPython) - Linux-5.3.0-29-generic-x86_64-with-glibc2.29
[debug] exe versions: avconv 12.3, avprobe 12.3, ffmpeg 4.1.4-1build2, ffprobe 4.1.4-1build2, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 0g6lDwNrsns: Downloading webpage
[youtube] 0g6lDwNrsns: Downloading video info webpage
[youtube] {18} signature length 109, html5 player vfl7lL1_p
[youtube] 0g6lDwNrsns: Downloading player https://www.youtube.com/yts/jsbin/player_ias-vfl7lL1_p/en_US/base.js
[youtube] {137} signature length 105, html5 player vfl7lL1_p
[youtube] 0g6lDwNrsns: Downloading player https://www.youtube.com/yts/jsbin/player_ias-vfl7lL1_p/en_US/base.js
[youtube] {248} signature length 105, html5 player vfl7lL1_p
[youtube] {136} signature length 109, html5 player vfl7lL1_p
[youtube] {247} signature length 109, html5 player vfl7lL1_p
[youtube] {135} signature length 109, html5 player vfl7lL1_p
[youtube] {244} signature length 109, html5 player vfl7lL1_p
[youtube] {134} signature length 109, html5 player vfl7lL1_p
[youtube] {243} signature length 105, html5 player vfl7lL1_p
[youtube] {133} signature length 105, html5 player vfl7lL1_p
[youtube] {242} signature length 105, html5 player vfl7lL1_p
[youtube] {160} signature length 109, html5 player vfl7lL1_p
[youtube] {278} signature length 109, html5 player vfl7lL1_p
[youtube] {140} signature length 109, html5 player vfl7lL1_p
[youtube] {249} signature length 105, html5 player vfl7lL1_p
[youtube] {250} signature length 109, html5 player vfl7lL1_p
[youtube] {251} signature length 109, html5 player vfl7lL1_p
[debug] Invoking downloader on 'https://r1---sn-ci5gup-h55z.googlevideo.com/videoplayback?expire=1579884977&ei=Uc0qXvmUHYGjwQHhoZ-QDw&ip=182.65.199.102&id=o-AI8z6ohZxYXjYwGbbhpbWhHsqWfUOlMVMKAqSiRzu0qV&itag=140&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-ci5gup-h55z%2Csn-cvh76nez&ms=au%2Conr&mv=m&mvi=0&pl=20&initcwndbps=688750&vprv=1&mime=audio%2Fmp4&gir=yes&clen=3117540&dur=192.586&lmt=1572272651653158&mt=1579863297&fvip=1&keepalive=yes&fexp=23842630%2C23860863&c=WEB&txp=2311222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgCwEPv7Kn6sGJidtdHIdCaMu1mbKV-SDLUptRKcYQrxwCIByBlm1SqgqW4LZOSreraW1IK7_kSRCnlMSg84A2fWxk&sig=ALgxI2wwRQIgeSnR_LSW57MS8ucaTRgGolURZq-eTP1dPqWLSd98k9sCIQCOS0OQdYQD8mH90li8HI1asK0U3dBmnYdfH6_ZrBYmng==&ratebypass=yes'
[download] Destination: /home/xyz/audios/Michael Kiwanuka performs «Hero» live _ SVT_TV 2_Skavlan.m4a
[download] 100% of 2.97MiB in 00:02
[ffmpeg] Correcting container in "/home/xyz/audios/Michael Kiwanuka performs «Hero» live _ SVT_TV 2_Skavlan.m4a"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/home/xyz/audios/Michael Kiwanuka performs «Hero» live _ SVT_TV 2_Skavlan.m4a' -c copy -f mp4 'file:/home/xyz/audios/Michael Kiwanuka performs «Hero» live _ SVT_TV 2_Skavlan.temp.m4a'
[debug] ffmpeg command line: ffprobe -show_streams 'file:/home/xyz/audios/Michael Kiwanuka performs «Hero» live _ SVT_TV 2_Skavlan.m4a'
[ffmpeg] Post-process file /home/xyz/audios/Michael Kiwanuka performs «Hero» live _ SVT_TV 2_Skavlan.m4a exists, skipping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.