youtube-dl: YT: TVHTML5 API JSON: ERROR: Sign in to confirm youre not a bot

Checklist

  • I’m reporting a broken site support issue
  • I’ve verified that I’m running youtube-dl version 2025.01.16
  • I’ve checked that all provided URLs are alive and playable in a browser
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar bug reports including closed ones
  • I’ve read bugs section in FAQ

Description and Verbose log

YT: TVHTML5 API JSON: ERROR: Sign in to confirm youre not a bot

Using newest nightly build (25-01-16), downloading format list or video itself fails with this error: ERROR: Sign in to confirm youre not a bot while using earlier version (25-01-06) does not.

$ ./ytdl-2025.01.06 -F https://www.youtube.com/watch?v=OjOiWe9MHNk
[youtube] OjOiWe9MHNk: Downloading webpage
[youtube] OjOiWe9MHNk: Downloading API JSON
[info] Available formats for OjOiWe9MHNk:
format code  extension  resolution note
599          m4a        audio only audio_quality_ultralow   30k , m4a_dash container, mp4a.40.5 (22050Hz), 6.87MiB
599-drc      m4a        audio only audio_quality_ultralow   30k , m4a_dash container, mp4a.40.5 (22050Hz), 6.87MiB
(...)
313          webm       3840x2160  2160p 11113k , webm_dash container, vp9, 30fps, video only, 2.42GiB
18           mp4        640x360    360p  459k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 102.64MiB (best)

$ ./ytdl-2025.01.16 -F https://www.youtube.com/watch?v=OjOiWe9MHNk
[youtube] OjOiWe9MHNk: Downloading webpage
[youtube] OjOiWe9MHNk: Downloading TVHTML5 API JSON
ERROR: Sign in to confirm you’re not a bot
This helps protect our community. Learn more

Verbose

$ ./youtube-dl-1 -v -F https://www.youtube.com/watch?v=OjOiWe9MHNk
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://www.youtube.com/watch?v=OjOiWe9MHNk']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2025.01.16 [55ad8a24c] (single file build)
[debug] ** This version was built from the latest master code at https://github.com/ytdl-org/youtube-dl.
[debug] ** For support, visit the main site.
[debug] Python 2.7.11 (CPython i686 32bit) - OpenSSL 1.0.1e 11 Feb 2013 - glibc 2.0
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] OjOiWe9MHNk: Downloading webpage
[youtube] OjOiWe9MHNk: Downloading TVHTML5 API JSON
ERROR: Sign in to confirm you’re not a bot
This helps protect our community. Learn more
Traceback (most recent call last):
  File "./ytdl-nightly-2025.01.16/youtube_dl/YoutubeDL.py", line 879, in wrapper
    return func(self, *args, **kwargs)
  File "./ytdl-nightly-2025.01.16/youtube_dl/YoutubeDL.py", line 975, in __extract_info
    ie_result = ie.extract(url)
  File "./ytdl-nightly-2025.01.16/youtube_dl/extractor/common.py", line 571, in extract
    ie_result = self._real_extract(url)
  File "./ytdl-nightly-2025.01.16/youtube_dl/extractor/youtube.py", line 2387, in _real_extract
    raise ExtractorError(reason, expected=True)
ExtractorError: Sign in to confirm you\u2019re not a bot
This helps protect our community. Learn more

Same for download.

1c1
< $ ./ytdl-2025.01.16 -v -F https://www.youtube.com/watch?v=OjOiWe9MHNk
---
> $ ./ytdl-2025.01.16 -v -f 18 https://www.youtube.com/watch?v=OjOiWe9MHNk
5c5
< [debug] Command-line args: [u'-v', u'-F', u'https://www.youtube.com/watch?v=OjOiWe9MHNk']
---
> [debug] Command-line args: [u'-v', u'-f', u'18', u'https://www.youtube.com/watch?v=OjOiWe9MHNk']

It seems to be triggered/aggrevated by adding ‘level/s of indirection’, I mean ‘links’ to it, but I’m not entirely sure how could it cause it.

$ echo /path/to/ytdl-nightly-2025.01.06 \"\$\@\" > ytdl-2025.01.06; chmod +x ytdl-2025.01.06
$ echo /path/to/ytdl-nightly-2025.01.16 \"\$\@\" > ytdl-2025.01.16; chmod +x ytdl-2025.01.16

Worse part of it is that it sometimes work. And when it works then few times in a row, when doesn’t the same - time and time again.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Running the extractor tests is the most intensive thing that I do with YT, so I don’t have useful experience. My understanding is what I wrote in https://github.com/ytdl-org/youtube-dl/issues/32960#issuecomment-2438220700.

As I may have posted before, discussions about people’s attitudes are generally not on topic. Actual test results and change proposals are.

It turns out that I hadn’t yet pushed the commit that I thought I had on Sunday. But now there is a new nightly release.