[YouTube] Failed to parse JSON with content flagged as "inappropriate" #25283

Open
opened 2026-02-21 13:44:16 -05:00 by deekerman · 3 comments
Owner

Originally created by @jiveandwail on GitHub (May 29, 2022).

  • [x ] I'm reporting a broken site support issue
  • [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 bug reports including closed ones
  • [x ] I've read bugs section in FAQ
youtube-dl -s -v https://www.youtube.com/watch?v=L4nyWlYga_w

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-s', '-v', 'https://www.youtube.com/watch?v=L4nyWlYga_w']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.8.10 (CPython) - Linux-5.4.0-113-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4
[debug] Proxy map: {}
[youtube] L4nyWlYga_w: Downloading webpage
WARNING: [youtube] L4nyWlYga_w: Failed to parse JSON Unterminated string starting at: line 1 column 52939 (char 52938)
[youtube] L4nyWlYga_w: Downloading API JSON
ERROR: The following content has been identified by the YouTube community as inappropriate or offensive to some audiences.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/youtube.py", line 1731, in _real_extract
    raise ExtractorError(reason, expected=True)
youtube_dl.utils.ExtractorError: The following content has been identified by the YouTube community as inappropriate or offensive to some audiences.

Intermittent Error: "Failed to parse JSON Unterminated string starting at: line 1 column" ; "The following content has been identified by the YouTube community as inappropriate..."

this error occurs intermittently on videos placed in "Limited State" (like above), run from a server in the USA.

other examples:
youtube-dl -s -v https://www.youtube.com/watch?v=QVw4oV8ECaY
youtube-dl -s -v https://www.youtube.com/watch?v=k2zf5dpTZws

Originally created by @jiveandwail on GitHub (May 29, 2022). - [x ] I'm reporting a broken site support issue - [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 bug reports including closed ones - [x ] I've read bugs section in FAQ ```ShellSession youtube-dl -s -v https://www.youtube.com/watch?v=L4nyWlYga_w [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-s', '-v', 'https://www.youtube.com/watch?v=L4nyWlYga_w'] [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8 [debug] youtube-dl version 2021.12.17 [debug] Python version 3.8.10 (CPython) - Linux-5.4.0-113-generic-x86_64-with-glibc2.29 [debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4 [debug] Proxy map: {} [youtube] L4nyWlYga_w: Downloading webpage WARNING: [youtube] L4nyWlYga_w: Failed to parse JSON Unterminated string starting at: line 1 column 52939 (char 52938) [youtube] L4nyWlYga_w: Downloading API JSON ERROR: The following content has been identified by the YouTube community as inappropriate or offensive to some audiences. Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 815, in wrapper return func(self, *args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 836, in __extract_info ie_result = ie.extract(url) File "/usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/common.py", line 534, in extract ie_result = self._real_extract(url) File "/usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/youtube.py", line 1731, in _real_extract raise ExtractorError(reason, expected=True) youtube_dl.utils.ExtractorError: The following content has been identified by the YouTube community as inappropriate or offensive to some audiences. ``` Intermittent Error: "Failed to parse JSON Unterminated string starting at: line 1 column" ; "The following content has been identified by the YouTube community as inappropriate..." this error occurs intermittently on videos placed in "Limited State" (like above), run from a server in the USA. other examples: youtube-dl -s -v https://www.youtube.com/watch?v=QVw4oV8ECaY youtube-dl -s -v https://www.youtube.com/watch?v=k2zf5dpTZws
Author
Owner

@dirkf commented on GitHub (May 29, 2022):

In all cases I get (UK):

ERROR: Video unavailable
This content is not available on this country domain.

However OP's diagnostic is similar to that in #30987. Whatever we do there, at least to improve the diagnostic, should also handle this case. The bottom line is that yt-dl can't be expected to fetch videos that the site has blocked.

@dirkf commented on GitHub (May 29, 2022): In all cases I get (UK): ``` ERROR: Video unavailable This content is not available on this country domain. ``` However OP's diagnostic is similar to that in #30987. Whatever we do there, at least to improve the diagnostic, should also handle this case. The bottom line is that yt-dl can't be expected to fetch videos that the site has blocked.
Author
Owner
@coletdjnz commented on GitHub (May 29, 2022): https://github.com/ytdl-org/youtube-dl/issues/30987#issuecomment-1140642230
Author
Owner

@dirkf commented on GitHub (Jun 1, 2022):

I'll assume that the fix for #30987 will sort this. The issue will be closed when that fix is merged. If it then reappears, please open a new issue referencing this.

@dirkf commented on GitHub (Jun 1, 2022): I'll assume that the fix for #30987 will sort this. The issue will be closed when that fix is merged. If it then reappears, please open a new issue referencing this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#25283
No description provided.