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

Failure to extract player url for a youtube video #32586

Closed
gl-yziquel opened this issue Oct 9, 2023 · 4 comments · Fixed by #32638
Closed

Failure to extract player url for a youtube video #32586

gl-yziquel opened this issue Oct 9, 2023 · 4 comments · Fixed by #32638

Comments

@gl-yziquel
Copy link

gl-yziquel commented Oct 9, 2023

Checklist

  • [ x] I'm reporting a broken site support
  • [ x] I've verified that I'm running youtube-dl version 2021.12.17
  • [ x] I've checked that all provided URLs are alive and playable in a browser
  • [ x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [ x] I've searched the bugtracker for similar issues including closed ones

Verbose log

mini-me@virtucon ~/h/l/cinema> youtube-dl --verbose 'https://www.youtube.com/watch?v=r0Ogt-q956I'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=r0Ogt-q956I']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Single file build
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-6.2.0-1010-nvidia-x86_64-with-glibc2.35 - OpenSSL 3.0.2 15 Mar 2022 - glibc 2.35
[debug] exe versions: ffmpeg 4.4.2, ffprobe 4.4.2
[debug] Proxy map: {}
[youtube] r0Ogt-q956I: Downloading webpage
[youtube] r0Ogt-q956I: Downloading API JSON
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/mini-me/home/hut/youtube-dl/youtube_dl/YoutubeDL.py", line 859, in wrapper
    return func(self, *args, **kwargs)
  File "/home/mini-me/home/hut/youtube-dl/youtube_dl/YoutubeDL.py", line 955, in __extract_info
    ie_result = ie.extract(url)
  File "/home/mini-me/home/hut/youtube-dl/youtube_dl/extractor/common.py", line 565, in extract
    ie_result = self._real_extract(url)
  File "/home/mini-me/home/hut/youtube-dl/youtube_dl/extractor/youtube.py", line 2128, in _real_extract
    self._sort_formats(formats)
  File "/home/mini-me/home/hut/youtube-dl/youtube_dl/extractor/common.py", line 1444, in _sort_formats
    raise ExtractorError('No video formats found')
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

This situation occurs for youtube-dl built from source revision 00ef748cc0e35ee60efd0f7a00e373ab8d1af86b.

As far as I could hunt down things, youtube-dl attempts to download https://www.youtube.com/watch?v=r0Ogt-q956I&bpctr=9999999999&has_verified=1 from the function _request_webpage which is invoked (with some levels of indirection) from _real_extract. In extractor/youtube.py, line 1602, in function _extract_player_url, there is the r'"(?:PLAYER_JS_URL|jsUrl)"\s*:\s*"([^"]+)"' regexp that is matched against the webpage whose url is given above, and nothing is found. It may therefore be a change in the contents of that webpage that induces this behaviour. I can unfortunately not go into debugging that without more background knowledge of what youtube precisely does and how it may or may not have changed recently. The _extract_player_url function is called in a loop on line 2034 of extractor/youtube.py and, because of this parsing failure, that loop is exited early, and the formats variable is never populated on line 2076 with the video formats. Hence the reported error.

@dirkf
Copy link
Contributor

dirkf commented Oct 9, 2023

[x] I've searched the bugtracker for similar issues including closed ones

Actually doing that would have saved you the debugging. Review #30839.

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2023
@dirkf dirkf added the duplicate label Oct 9, 2023
@gl-yziquel
Copy link
Author

I've spent a whole morning looking for a similar issue. Debugging happened faster and more methodically than searching for a needle in a haystack. And I still do not know how to solve that issue. I'll spend another morning tomorrow. Or in a week.

@gl-yziquel
Copy link
Author

Duplicate from this one, perhaps ? #32499

It would perhaps make sense to attempt to link such issues with this error message in the youtube-dl cli app itself.

@gl-yziquel
Copy link
Author

The yt-dlp repo gets around this issue.

https:/yt-dlp/yt-dlp

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

Successfully merging a pull request may close this issue.

2 participants