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

'Cannot identify player %r' error downloading Escapist files from YouTube #8067

Closed
wyldphyre opened this issue Dec 31, 2015 · 10 comments
Closed

'Cannot identify player %r' error downloading Escapist files from YouTube #8067

wyldphyre opened this issue Dec 31, 2015 · 10 comments

Comments

@wyldphyre
Copy link

@wyldphyre wyldphyre commented Dec 31, 2015

I'm using youtube-dl from a simple Python script to automate downloading of YouTube videos. I've found that videos from Escapist, such as https://www.youtube.com/watch?v=EAzpn8vsc9k, fail with the 'cannot identify player error' when run from my script, but if I just pass the url to youtube-dl on the command line the download still happens, despite a warning about the DASH being forbidden:

Here is a simplified example of what I'm trying to do

ydl_opts = {
'outtmpl': '~/Movies/YouTubeDownloads/%(uploader)s/%(title)s.%(ext)s',
}

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
        for line in lines:
                ydl.download('https://www.youtube.com/watch?v=EAzpn8vsc9k')
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 31, 2015

You are using an outdated version of youtube-dl. Read our FAQ if you have troubles updating.

@dstftw dstftw closed this Dec 31, 2015
@wyldphyre
Copy link
Author

@wyldphyre wyldphyre commented Dec 31, 2015

From memory I had to do a manual install, but I've updated it using youtube-dl -U.

Running youtube-dl --version gives me 2015.12.29 which seems about as current as it can get.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 31, 2015

@wyldphyre
Copy link
Author

@wyldphyre wyldphyre commented Dec 31, 2015

OK, lets try this.

I've updated youtube-dl and have apparently got an up to date version. Version is reported as 2015.12.29, which is 2 days old as I write this.

Below is a slightly modified version of the sample script provided for using youtube-dl via Python.

To Test

  1. Run script as is. It should work.
  2. Comment out the second last line, and uncomment the last line
  3. Run modified script.
  4. Script should fail with an stack trace (which I'm listed at the end of this comment)
#! /usr/bin/env python

from __future__ import unicode_literals
import youtube_dl


class MyLogger(object):
    def debug(self, msg):
        pass

    def warning(self, msg):
        pass

    def error(self, msg):
        print(msg)


def my_hook(d):
    if d['status'] == 'finished':
        print('Done downloading, now converting ...')


ydl_opts = {
    'format': 'bestaudio/best',
    'logger': MyLogger(),
    'progress_hooks': [my_hook],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])
#    ydl.download(['https://www.youtube.com/watch?v=EAzpn8vsc9k']) #fails

Failure Stack Trace
ERROR: Signature extraction failed: Traceback (most recent call last):
File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 817, in _decrypt_signature
video_id, player_url, s
File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 709, in _extract_signature_function
raise ExtractorError('Cannot identify player %r' % player_url)
ExtractorError: Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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(u"Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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 "./test.py", line 30, in
ydl.download(['https://www.youtube.com/watch?v=EAzpn8vsc9k']) #fails
File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/YoutubeDL.py", line 1666, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/YoutubeDL.py", line 676, in extract_info
self.report_error(compat_str(de), de.format_traceback())
File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/YoutubeDL.py", line 536, in report_error
self.trouble(error_message, tb)
File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/YoutubeDL.py", line 506, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Signature extraction failed: Traceback (most recent call last):
File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 817, in _decrypt_signature
video_id, player_url, s
File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 709, in _extract_signature_function
raise ExtractorError('Cannot identify player %r' % player_url)
ExtractorError: Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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(u"Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 31, 2015

Will you read it already?

Please include the full output of youtube-dl when run with -v, i.e. add -v flag to your command line, copy the whole output and post it in the issue body wrapped in ``` for better formatting. It should look similar to this:

$ youtube-dl -v http://www.youtube.com/watch?v=BaW_jenozKcj
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2015.12.06
[debug] Git HEAD: 135392e
[debug] Python version 2.6.6 - Windows-2003Server-5.2.3790-SP2
[debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
[debug] Proxy map: {}
...

Do not post screenshots of verbose log only plain text is acceptable.

@wyldphyre
Copy link
Author

@wyldphyre wyldphyre commented Dec 31, 2015

I read it. The problem is that doing the verbose command line doesn't fail. There is a warning, but then it carries on.

However, you're right, I should have included that bit as well, sorry about that. Here is it...

youtube-dl -v https://www.youtube.com/watch\?v\=EAzpn8vsc9k
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=EAzpn8vsc9k']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.12.29
[debug] Python version 2.7.10 - Darwin-15.2.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] EAzpn8vsc9k: Downloading webpage
[youtube] EAzpn8vsc9k: Downloading video info webpage
[youtube] EAzpn8vsc9k: Extracting video information
[youtube] {43} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {18} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {136} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {135} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {134} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {133} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {160} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {140} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {171} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {249} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {250} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] {251} signature length 43.43, html5 player en_US-vflnrstgx
[youtube] EAzpn8vsc9k: Downloading DASH manifest
[youtube] EAzpn8vsc9k: Downloading player https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/base.js
[youtube] EAzpn8vsc9k: Downloading DASH manifest
WARNING: Could not download DASH manifest: HTTP Error 403: Forbidden
[debug] Invoking downloader on u'https://r1---sn-v2u0n-2xge.googlevideo.com/videoplayback?source=youtube&ms=au&mv=m&mt=1451526559&mn=sn-v2u0n-2xge&mm=31&requiressl=yes&key=yt6&lmt=1450727125215058&upn=4K0HxPnA27o&id=o-AEvHZ3Xg1Mc6IMpeCPqFiGouoXvlqNoykfd6ytNWGXmD&initcwndbps=242500&gcr=au&mime=video%2Fmp4&sparams=dur%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&fexp=9407052%2C9416126%2C9418750%2C9419451%2C9420017%2C9420452%2C9422596%2C9423662%2C9426413%2C9426483&ip=180.216.59.248&sver=3&expire=1451548197&dur=347.765&pl=19&ratebypass=yes&itag=18&ipbits=0&signature=6241D96754008B18B0FA328928AEB32E1078BA9B.A645276CFA98212F98B4A15B788D8CBE365A12D9'
[download] Destination: Fatal Frame - Maiden of Black Water (Zero Punctuation)-EAzpn8vsc9k.mp4
[download] 100% of 8.29MiB in 00:39
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 31, 2015

Now add 'verbose': True to options in script.

@wyldphyre
Copy link
Author

@wyldphyre wyldphyre commented Dec 31, 2015

Output from the script with 'verbose': 'true' turned on

[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.11.02
[debug] Python version 2.7.10 - Darwin-15.2.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 817, in _decrypt_signature
    video_id, player_url, s
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 709, in _extract_signature_function
    raise ExtractorError('Cannot identify player %r' % player_url)
ExtractorError: Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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(u"Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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 "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 817, in _decrypt_signature
    video_id, player_url, s
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 709, in _extract_signature_function
    raise ExtractorError('Cannot identify player %r' % player_url)
ExtractorError: Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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 "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/YoutubeDL.py", line 661, in extract_info
    ie_result = ie.extract(url)
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/common.py", line 290, in extract
    return self._real_extract(url)
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 1345, in _real_extract
    encrypted_sig, video_id, player_url, age_gate)
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 827, in _decrypt_signature
    'Signature extraction failed: ' + tb, cause=e)
ExtractorError: Signature extraction failed: Traceback (most recent call last):
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 817, in _decrypt_signature
    video_id, player_url, s
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 709, in _extract_signature_function
    raise ExtractorError('Cannot identify player %r' % player_url)
ExtractorError: Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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(u"Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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 "./test.py", line 31, in <module>
    ydl.download(['https://www.youtube.com/watch?v=EAzpn8vsc9k']) #fails
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/YoutubeDL.py", line 1666, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/YoutubeDL.py", line 676, in extract_info
    self.report_error(compat_str(de), de.format_traceback())
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/YoutubeDL.py", line 536, in report_error
    self.trouble(error_message, tb)
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/YoutubeDL.py", line 506, in trouble
    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 817, in _decrypt_signature
    video_id, player_url, s
  File "/Users/craigreynolds/Library/Python/2.7/lib/python/site-packages/youtube_dl/extractor/youtube.py", line 709, in _extract_signature_function
    raise ExtractorError('Cannot identify player %r' % player_url)
ExtractorError: Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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(u"Cannot identify player u'https://s.ytimg.com/yts/jsbin/player-en_US-vflnrstgx/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.
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 31, 2015

[debug] youtube-dl version 2015.11.02

Here you go. It picks up youtube-dl from somewhere else.

@wyldphyre
Copy link
Author

@wyldphyre wyldphyre commented Dec 31, 2015

Bugger. Maybe I'll try uninstalling and reinstalling.

Thanks for the help.

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.