youtube-dl: [YouTube] unable to extract player URL, Sign in to confirm you're not a bot
Checklist
- I’m reporting a broken site support
- I’ve verified that I’m running youtube-dl version 2025-05-05
- 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 issues including closed ones
Verbose log
For few days now, I constantly get this (title) error. Sometimes, when I change IP, it works once or twice, and then fails again. And then stays this way for good.
$ youtube-dl-2025.05.05 --version
2025.05.05
$ youtube-dl-2025.05.05 -v https://www.youtube.com/watch?v=uLpknfbhv7Y
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=uLpknfbhv7Y']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2025.05.05 [a084c80f7] (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] uLpknfbhv7Y: Downloading webpage
WARNING: [youtube] unable to extract player URL; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
WARNING: [youtube] Cannot extract signature timestamp without player url
[youtube] uLpknfbhv7Y: Downloading TVHTML5 API JSON
WARNING: [youtube] unable to extract player URL; please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
ERROR: Sign in to confirm you’re not a bot
This helps protect our community. Learn more
Traceback (most recent call last):
File "./youtube-dl-2025.05.05/youtube_dl/YoutubeDL.py", line 886, in wrapper
return func(self, *args, **kwargs)
File "./youtube-dl-2025.05.05/youtube_dl/YoutubeDL.py", line 982, in __extract_info
ie_result = ie.extract(url)
File "./youtube-dl-2025.05.05/youtube_dl/extractor/common.py", line 573, in extract
ie_result = self._real_extract(url)
File "./youtube-dl-2025.05.05/youtube_dl/extractor/youtube.py", line 2592, 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
This failure ‘expands’ to all other operationf like `–format’, `–get-description’, etc.
Here is successful attempt:
$ youtube-dl-2025.05.05 -v https://www.youtube.com/watch?v=uLpknfbhv7Y
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=uLpknfbhv7Y']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2025.05.05 [a084c80f7] (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] uLpknfbhv7Y: Downloading webpage
[youtube] uLpknfbhv7Y: Downloading TVHTML5 API JSON
[youtube] uLpknfbhv7Y: Downloading player 612f74a3-main
[debug] Saving youtube-nsig.612f74a3-main to cache
[debug] [youtube] Decrypted nsig VQTX9tHu606H3C7YC => HLrZJNLv821jzw
[debug] [youtube] Decrypted nsig lt-jo7vihWoDX7PG_ => JpsD599LIpt8Pw
[debug] Default format spec: best/bestvideo+bestaudio
[debug] Invoking downloader on u'https://rr1---sn-u2oxu-3ufs.googlevideo.com/videoplayback?rms=au%2Cau&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Ccnr%2Cratebypass%2Cdur%2Clmt&ei=TMFBaP72IuL-i9oPotXu0AI&ip=2a00%3Af41%3A283e%3Ae37b%3A21f%3A3cff%3Afe31%3Af779&id=o-AGc0-K5X-sCt4OLIIaLtFQLjk6-_oNKpGInNUepCA9LX&txp=5538434&svpuc=1&lsig=APaTxxMwRAIgal-OnmhZPKB5xAXTAT6oL9Iv-dH6Kn9tM47bEGKCmmACIDn4MsF_-3RjpRFYCbIt8D-fywUQFtGGWFxrs9jD1L9D&cnr=14&xpc=EgVo2aDSNQ%3D%3D&requiressl=yes&ratebypass=yes&source=youtube&sig=AJfQdSswRgIhAINk2-_ETZHYHJUg_7avy_Z65-g5Mh4peW0xYJP35ZN2AiEA8Yp49sZzqmtfTZ-P5T7nd0nXqWuP-KQ9L7xYi8BLCmw%3D&bui=AY1jyLOgsKIaN4soJRaQF3j5A5XH94sKD78ML6vYHV52abY7C7hneC_0-81ImNFl1V7H27M_65kc4fv_&ns=sn_FhgjnQkE1xkWQXOfeXLEQ&initcwndbps=726250&vprv=1&itag=18&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lmt=1665396717084014&lmw=1&met=1749139788%2C&expire=1749161388&mime=video%2Fmp4&fvip=3&dur=70.611&rqh=1&c=TVHTML5&sefc=1&mm=31%2C29&mn=sn-u2oxu-3ufs%2Csn-u2oxu-f5fe7&mh=qx&n=HLrZJNLv821jzw&mt=1749139524&mv=m&pl=44&ms=au%2Crdu&mvi=1'
[download] Destination: Giant METEOR flashes over UK rooftops ‘like a firework’-uLpknfbhv7Y.mp4
[download] 100% of 1.66MiB in 00:02
Description
As described above.
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 37 (10 by maintainers)
Hi!, for now you can do this: youtube-dl --user-agent “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36” https://www.youtube.com/watch?v=uLpknfbhv7Y
for example.
In principle, this is just #32960 again.
However, I, and previously @NicerEnterprises, have noticed that this seems to be happening more frequently, especially with Py2.7 (using an older version of urllib2).
Considering the suggested work-around, the YT page is fetched with a UA randomly chosen from a list, while the InnerTube API calls use specific, current, UAs and other header data. The random choice (only) is overridden by the command-line option
--user-agent ....We haven’t updated the list from which UAs are randomly chosen for years. I can’t really see why it should be so long or so outdated. It’s enormously more likely that an old UA gets booted out than that the site kindly serves a page suitable for that UA, so we might as well use a small pool of vaguely up-to-date UAs instead.
Here is the list of current UAs (ironically a page protected by Cloudflare Turnstile that just breaks with older browsers rather than rejecting them), most popular first, popularity >= 2%:
[How astonishing is it that all these people are using the “could break at any time” rapid release FF instead of ESR 128 that they should be using?]
Also,
User-Agentis the QWERTY keyboard or IPv4 of headers, technically deprecated for years but still going strong. MDN says that we might also send “low-entropy” client-hints likeSec-CH-UA-.... It was once proposed that these more fully specified headers would be sent withUser-Agentomitted or reduced to a generic value likeMozilla/5.0 Gecko/20100101. At least in FF 128, no unsolicited CH-UA headers are being sent.We could also be sending the
Sec-Fetch-...headers which are sent by default by FF128 and which do need to be sent for some sites.Currently, the plan is to align the internal UA version list with a subset of the 38 versions used by yt-dlp as a start, even if that probably won’t be good for another 4 years as it has already been downstream.
Why not just replace all these old UA’s with the ones yt-dlp uses in their
yt_dlp/utils/networking.py?show diff
I tested a few random videos and got no bot warnings.
I tested it empirically and found out that Chrome versions <74 were blocked but all the others worked, so you only need to remove about a thousand entries from the list.
Fewer random UAs is a small win for application size.
Too few might offer a more obvious signature, but the YT extractor, (especially if upgraded to match that in yt-dlp) does many weird things that could give it away.
Anyway, “too few” is hardly the case now. Currently UAs are generated from this template for a Windows Chrome UA:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36with%spopulated by one of 1576 Chrome versions in the exclusive range 68.0.0.0…77.0.0.0. yt-dlp uses the same template with one of 38 Chrome versions in the exclusive range 90.0.0.0…98.0.0.0 since https://github.com/yt-dlp/yt-dlp/commit/19b4c74d4059045eee702ac481d5a38438929dc7 but this range of Chrome versions, newer than 76, may be expected to sendSec-Fetch-.... Who knows what additional headers some sites may require if we send v136?We also have a
USER_AGENTSdictwith one entry,Safarihaving valueMozilla/5.0 (X11; Linux x86_64; rv:10.0) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27, used only by one extractor (CeskaTelevizeIE). As this is public inutils.py, it can’t be removed and perhaps not changed without notice.Both on principle and because I don’t want to have to maintain either a Windows platform or a Chrome installation, or indeed a Mac, for debugging, I would prefer to use a Firefox Linux UA, but then we’re in the 8% rather than the 30%.
Even without changing the core UA generation, it would be possible to hard-code a newer Chrome UA and other headers in the YT extractor. With the current implementation where
--user-agent ...and--add-header ...update a global header dict, it’s not really possible for the extractor settings to be overridden; yt-dlp addedhttp_headersas aYoutubeDLparameter, allowing extractors to prefer user-specified headers if desired.Using
2025.05.05, I’m getting this for https://www.youtube.com/watch?v=n3dq8I4uSw0. I’ve noticed that some videos seem to work while others result in this failure. I’ve attached the output of--verbosein case it’s of interest.Using the suggestion from 6/5/2025 doesn’t seem to work.
debug.log
For specific sites, the UA is rolled into the extractor: as described above, YT potentially uses a different UA for each InnerTube client, while for a site with Akamai blocking like telecinco.es a recent UA is tried before falling back to impersonation. I suppose that like me, they just wonder what would break if recent UAs were sent generally (yes). Also, the 90-ish versions date from when UA sanitisation was starting to be standardised, so maybe UA-based discriminators (other than Akamai) tend to give up when they see those or later versions.
Indeed. Since v80, Chrome (for FF, v90) has been sending
Sec-Fetch-...headers that we don’t send and yt-dlp does. So we’d want to roll in that change and probably also make the header options into a fully fledged param rather a module global as now.A patch? Sorry, I don’t know git well enough to do such a thing (it’s 20 KB anyway), and github even less, but if you have vim, you can open utils.py and say:
:g/ '\(6\|7[0-3]\)/d(that’s two spaces) and if it says1119 fewer linesin response, you did it right.:wqto save and exit.Feel free to make that into patch/pull-up form yourself.