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

Signature extraction failed #23883

Closed
hersoncruz opened this issue Jan 29, 2020 · 5 comments
Closed

Signature extraction failed #23883

hersoncruz opened this issue Jan 29, 2020 · 5 comments

Comments

@hersoncruz
Copy link

@hersoncruz hersoncruz commented Jan 29, 2020

My script in python:

from __future__ import unicode_literals
import youtube_dl
import os
from sys import argv

# Download data and config

download_options = {
    'format': 'bestaudio/best',
    'outtmpl': '%(title)s.$(ext)s',
    'nocheckcertificate': True,
    'yesplaylist': True,
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
    }],
}

# Songs folder
if not os.path.exists('Songs'):
    os.mkdir('Songs')
else:
    os.chdir('Songs')

# Download media
with youtube_dl.YoutubeDL(download_options) as dl:
    with open('../' + argv[1], 'r') as f:
        for song_url in f:
            dl.download([song_url])

The output:

[youtube:playlist] PLF-qa2XynaCU5lkOV4w7j6llxHvqQrW0n: Downloading webpage
[download] Downloading playlist: Music
[youtube:playlist] playlist Music: Downloading 12 videos
[download] Downloading video 1 of 12
[youtube] nzKOLBzdwM0: Downloading webpage
[youtube] nzKOLBzdwM0: Downloading video info webpage
[youtube] nzKOLBzdwM0: Downloading js player vflbDJ8ds
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1380, in _decrypt_signature
    video_id, player_url, s
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1293, in _extract_signature_function
    cache_res = res(test_string)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1356, in <lambda>
    return lambda s: initial_function([s])
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 258, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 92, in interpret_expression
    m.group('expr'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 211, in interpret_expression
    raise ExtractorError('Unsupported JS expression %r' % expr)
youtube_dl.utils.ExtractorError: Unsupported JS expression '[1999057972,'; 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("Unsupported JS expression '[1999057972,'; 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/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1380, in _decrypt_signature
    video_id, player_url, s
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1293, in _extract_signature_function
    cache_res = res(test_string)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1356, in <lambda>
    return lambda s: initial_function([s])
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 258, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 92, in interpret_expression
    m.group('expr'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 211, in interpret_expression
    raise ExtractorError('Unsupported JS expression %r' % expr)
youtube_dl.utils.ExtractorError: Unsupported JS expression '[1999057972,'; 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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 796, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 2043, in _real_extract
    encrypted_sig, video_id, player_url, age_gate)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1390, in _decrypt_signature
    'Signature extraction failed: ' + tb, cause=e)
youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1380, in _decrypt_signature
    video_id, player_url, s
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1293, in _extract_signature_function
    cache_res = res(test_string)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1356, in <lambda>
    return lambda s: initial_function([s])
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 258, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 92, in interpret_expression
    m.group('expr'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 211, in interpret_expression
    raise ExtractorError('Unsupported JS expression %r' % expr)
youtube_dl.utils.ExtractorError: Unsupported JS expression '[1999057972,'; 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("Unsupported JS expression '[1999057972,'; 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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "downloader.py", line 30, in <module>
    dl.download([song_url])
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 2018, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 807, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 1007, in process_ie_result
    extra_info=extra)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 869, in process_ie_result
    extra_info=extra_info)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 819, in extract_info
    self.report_error(compat_str(e), e.format_traceback())
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 624, in report_error
    self.trouble(error_message, tb)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 594, in trouble
    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1380, in _decrypt_signature
    video_id, player_url, s
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1293, in _extract_signature_function
    cache_res = res(test_string)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/extractor/youtube.py", line 1356, in <lambda>
    return lambda s: initial_function([s])
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 258, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 92, in interpret_expression
    m.group('expr'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 189, in interpret_expression
    m.group('x'), local_vars, allow_recursion - 1)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python3.7/site-packages/youtube_dl/jsinterp.py", line 211, in interpret_expression
    raise ExtractorError('Unsupported JS expression %r' % expr)
youtube_dl.utils.ExtractorError: Unsupported JS expression '[1999057972,'; 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("Unsupported JS expression '[1999057972,'; 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.
@mineiroPT
Copy link

@mineiroPT mineiroPT commented Jan 29, 2020

Probably related to this:
#23819

make sure you have the last version from 2020-01-24

@dmattera
Copy link

@dmattera dmattera commented Jan 29, 2020

Probably related to this:
#23819

make sure you have the last version from 2020-01-24

I am not the original reporter of the issue but I too was receiving the same ExtractorError("Unsupported JS expression '[1999057972,'... error on some (not all) youtube links and can confirm that after updating from 2019.11.28 to 2020.1.24 the issue was resolved for all affected URLs

@hersoncruz
Copy link
Author

@hersoncruz hersoncruz commented Jan 29, 2020

Probably related to this:
#23819

make sure you have the last version from 2020-01-24

Already have latest version:

youtube-dl --version
2020.01.24

Issue persist.

@hersoncruz
Copy link
Author

@hersoncruz hersoncruz commented Jan 29, 2020

My bad, had to upgrade python package as well:

➜  pip3 uninstall youtube-dl
Uninstalling youtube-dl-2019.10.22:
  Would remove:
    /usr/local/bin/youtube-dl
    /usr/local/etc/bash_completion.d/youtube-dl.bash-completion
    /usr/local/etc/fish/completions/youtube-dl.fish
    /usr/local/lib/python3.7/site-packages/youtube_dl-2019.10.22.dist-info/*
    /usr/local/lib/python3.7/site-packages/youtube_dl/*
    /usr/local/share/doc/youtube_dl/README.txt
    /usr/local/share/man/man1/youtube-dl.1
Proceed (y/n)? y   
  Successfully uninstalled youtube-dl-2019.10.22

➜  pip3 install youtube-dl  
Collecting youtube-dl
  Downloading https://files.pythonhosted.org/packages/05/d4/64dfe51be0fae772e86be3c83d82ec22d59aa8521d8834e10355bf60f9f5/youtube_dl-2020.1.24-py2.py3-none-any.whl (1.8MB)
     |████████████████████████████████| 1.8MB 1.3MB/s 
Installing collected packages: youtube-dl
Successfully installed youtube-dl-2020.1.24
@neahahul
Copy link

@neahahul neahahul commented Apr 10, 2020

I made a full system upgrade, error still persists

$ youtube-dl --verbose "https://youtu.be/sW8dvj-cn64"
[debug] System config: []
[debug] User config: ['-o', '~/Downloads/youtube-dl/%(title)s.%(ext)s']
[debug] Custom config: []
[debug] Command-line args: ['--add-metadata', '-i', '--verbose', 'https://youtu.be/sW8dvj-cn64']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.03.01
[debug] Python version 3.8.1 (CPython) - Linux-5.5.7-arch1-1-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2
[debug] Proxy map: {}
[youtube] sW8dvj-cn64: Downloading webpage
[youtube] sW8dvj-cn64: Downloading video info webpage
WARNING: unable to extract html5 player; 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.
[youtube] {18} signature length 108, html5 player None
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 1384, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    raise ExtractorError('Cannot identify player %r' % player_url)
youtube_dl.utils.ExtractorError: Cannot identify player 'https://www.youtube.com/s/player/4fbb4d5b/player_ias.vflset/en_US/base.js'; 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("Cannot identify player 'https://www.youtube.com/s/player/4fbb4d5b/player_ias.vflset/en_US/base.js'; 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/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 1384, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    raise ExtractorError('Cannot identify player %r' % player_url)
youtube_dl.utils.ExtractorError: Cannot identify player 'https://www.youtube.com/s/player/4fbb4d5b/player_ias.vflset/en_US/base.js'; 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/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 1384, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    raise ExtractorError('Cannot identify player %r' % player_url)
youtube_dl.utils.ExtractorError: Cannot identify player 'https://www.youtube.com/s/player/4fbb4d5b/player_ias.vflset/en_US/base.js'; 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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 2047, in _real_extract
    signature = self._decrypt_signature(
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 1394, in _decrypt_signature
    raise ExtractorError(
youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 1384, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py", line 1262, in _extract_signature_function
    raise ExtractorError('Cannot identify player %r' % player_url)
youtube_dl.utils.ExtractorError: Cannot identify player 'https://www.youtube.com/s/player/4fbb4d5b/player_ias.vflset/en_US/base.js'; 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("Cannot identify player 'https://www.youtube.com/s/player/4fbb4d5b/player_ias.vflset/en_US/base.js'; 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. 
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
5 participants
You can’t perform that action at this time.