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

[youtube] Failed to extract any player response; #9806

Closed
9 of 11 tasks
teachernightowl opened this issue Apr 27, 2024 · 2 comments
Closed
9 of 11 tasks

[youtube] Failed to extract any player response; #9806

teachernightowl opened this issue Apr 27, 2024 · 2 comments
Labels
question Question

Comments

@teachernightowl
Copy link

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

United States

Provide a description that is worded well enough to be understood

Context: I tried yt-dlp on both Ubuntu 22.04 LTS and the Debian 12. Both were freshly installed, minimal, fully updated before installing yt-dlp.

I used this bash script to install yt-dlp...

#!/bin/bash
sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
sudo yt-dlp -U
exit

I have tried all three branches - stable, nightly, and master - on both machines. All of them generate the same error.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

sysadmin@debian12:~$ sudo yt-dlp -U
Latest version: nightly@2024.04.21.232710 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.04.21.232710 from yt-dlp/yt-dlp-nightly-builds)
sysadmin@debian12:~$ yt-dlp -vU --compat-options no-certifi --no-check-certificates "https://www.youtube.com/watch?v=_Cpu9Z3z6pU"
[debug] Command-line config: ['-vU', '--compat-options', 'no-certifi', '--no-check-certificates', 'https://www.youtube.com/watch?v=_Cpu9Z3z6pU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.04.21.232710 from yt-dlp/yt-dlp-nightly-builds [ff38a011d] (zip)
[debug] Compatibility options: no-certifi
[debug] Python 3.11.2 (CPython x86_64 64bit) - Linux-6.1.0-20-amd64-x86_64-with-glibc2.36 (OpenSSL 3.0.11 19 Sep 2023, glibc 2.36)
[debug] exe versions: none
[debug] Optional libraries: certifi-2022.09.24, requests-2.28.1, sqlite3-3.40.1, urllib3-1.26.12
[debug] Proxy map: {}
[debug] Request Handlers: urllib
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.04.21.232710 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.04.21.232710 from yt-dlp/yt-dlp-nightly-builds)
[youtube] Extracting URL: https://www.youtube.com/watch?v=_Cpu9Z3z6pU
[youtube] _Cpu9Z3z6pU: Downloading webpage
WARNING: [youtube] unable to extract initial player response; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] _Cpu9Z3z6pU: Downloading ios player API JSON
WARNING: [youtube] _Cpu9Z3z6pU: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] _Cpu9Z3z6pU: Downloading android player API JSON
WARNING: [youtube] _Cpu9Z3z6pU: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] _Cpu9Z3z6pU: Downloading iframe API JS
WARNING: [youtube] unable to extract player version; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] _Cpu9Z3z6pU: Downloading web player API JSON
WARNING: [youtube] _Cpu9Z3z6pU: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
ERROR: [youtube] _Cpu9Z3z6pU: Failed to extract any player response; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py", line 734, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/yt-dlp/yt_dlp/extractor/youtube.py", line 4079, in _real_extract
    webpage, master_ytcfg, player_responses, player_url = self._download_player_responses(url, smuggled_data, video_id, webpage_url)
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/yt-dlp/yt_dlp/extractor/youtube.py", line 4043, in _download_player_responses
    player_responses, player_url = self._extract_player_responses(
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/yt-dlp/yt_dlp/extractor/youtube.py", line 3733, in _extract_player_responses
    raise ExtractorError('Failed to extract any player response')
@teachernightowl teachernightowl added site-bug Issue with a specific website triage Untriaged issue labels Apr 27, 2024
@bashonly
Copy link
Member

bashonly commented Apr 29, 2024

Can you confirm this please:

  • I've checked that all provided URLs are playable in a browser with the same IP and same login details

Also:

--compat-options no-certifi --no-check-certificates

Why?

Are you sure that the responses to your requests are actually coming from youtube?

@bashonly bashonly added incomplete Further information is needed and removed triage Untriaged issue labels Apr 29, 2024
@teachernightowl
Copy link
Author

Yes, confirmed. The URL is playable in the browser on the same computer as the cli was returning the error.

That said, your questions pointed me to the solution. There is DNS filtering on the network that blocks YouTube and the browser - Firefox - has DNS set so the browser was using different DNS than the terminal.

The reason I was using the --compat-options no-certifi --no-check-certificates parameters was because I was getting ssl errors at first and reading forums offered that as a solution.

Thanks for your help. I am closing the issue.

@bashonly bashonly added question Question and removed incomplete Further information is needed site-bug Issue with a specific website labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

2 participants