yt-dlp: [YouTube] nsig extraction now fails
Checklist
- I’m reporting a broken site
- I’ve verified that I’m running yt-dlp version 2022.01.21. (update instructions)
- 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. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
No response
Description
Starting sometime today (as of posting this), yt-dlp now throws an error about nsig extraction failing when downloading YouTube videos. I don’t know what caused this as earlier today no error would come up when downloading videos (perhaps Google changed something on their end). I don’t use an account for downloading videos either. I canceled the download shortly after the error comes up as it would take too long to actually download the video (my phone ISP throttles YouTube to 300KB/s). If you want me to attempt to download the video completely to see if something else happens please let me know.
Verbose log
[debug] Command-line config: ['-vU', 'https://www.youtube.com/watch?v=fCucjL2SmLE'] [debug] User config "/data/data/com.termux/files/home/.config/yt-dlp/config": ['--no-mtime', '--ignore-errors', '--min-sleep-interval', '4', '--max-sleep-interval', '20', '-o', '/data/data/com.termux/files/home/storage/shared/Youtube/%(playlist_index)s-%(title)s-%(id)s.%(ext)s', '-f', 'bv*+ba/b', '--remux-video', 'mp4/mkv'] [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.01.21 [f20d607b0] [debug] Python version 3.10.1 (CPython 64bit) - Linux-4.14.243-gb26579d061ac-aarch64-with-libc
[debug] exe versions: ffmpeg 4.4.1 (setts), ffprobe 4.4.1
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.01.21, Current version: 2022.01.21 yt-dlp is up to date (2022.01.21)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=fCucjL2SmLE
[youtube] fCucjL2SmLE: Downloading webpage
[youtube] fCucjL2SmLE: Downloading android player API JSON
[youtube] fCucjL2SmLE: Downloading player e06dea74
WARNING: [youtube] nsig extraction failed: You may experience throttling for some formats
n = SrIafPCsV8qC_dqlxb ; player = https://www.youtube.com/s/player/e06dea74/player_ias.vflset/en_US/base.js
fCucjL2SmLE: Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/yt_dlp/extractor/youtube.py", line 2412, in _decrypt_nsig
self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/yt_dlp/extractor/youtube.py", line 2433, in _extract_n_function
funcname = self._extract_n_function_name(jscode)
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/yt_dlp/extractor/youtube.py", line 2421, in _extract_n_function_name
return self._search_regex(
File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1186, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
yt_dlp.utils.RegexNotFoundError: Unable to extract Initial JS player n function name; please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see https://github.com/yt-dlp/yt-dlp on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
(caused by RegexNotFoundError('Unable to extract \x1b[0;94mInitial JS player n function name\x1b[0m; please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see https://github.com/yt-dlp/yt-dlp on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.')); please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see https://github.com/yt-dlp/yt-dlp on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] fCucjL2SmLE: Downloading 1 format(s): 303+251
[debug] Invoking downloader on "https://rr3---sn-uhvcpax0n5-jaxe.googlevideo.com/videoplayback?expire=1643708580&ei=Q6z4YZLtO9qG_9EP1qGQqAY&ip=2607%3Afb90%3Ab44a%3A86d0%3A2712%3Aece0%3A81de%3Afccc&id=o-ALYlukkQbrVn0GLFpxySaVPS-7J6aAvt2WWkXvhEMJW9&itag=303&source=youtube&requiressl=yes&mh=gV&mm=31%2C29&mn=sn-uhvcpax0n5-jaxe%2Csn-vgqsknee&ms=au%2Crdu&mv=m&mvi=3&pl=40&initcwndbps=372500&vprv=1&mime=video%2Fwebm&gir=yes&clen=291319771&dur=1595.993&lmt=1602424298587367&mt=1643686600&fvip=3&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgQsEO4Y5mW0o6w77DN6i_XWvz8cDxzpCMDl-dSmYVNg0CIQCX6Evlhshum9IiDu3j5lJ3Q_DBNRhLtJcs8zZuA_unIw%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAKaxI9rfL6RwLY6CHhfxjVMHcDC2rAxq5lYLqYOynyTxAiAsR8sXawG_gyI29U1ziLOI25Fd1x9vuzsuisV0zDn_wA%3D%3D"
[download] Sleeping 12.34 seconds ...
^C
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (10 by maintainers)
It’s fine. I dont expect users to look at commit history before opening issues. Today we just happened to notice (and fix) it immediately. If this happens again in the future, don’t hesitate to report
Youtube is throttling all formats. But our android fallback “unthrottles” most
Already fixed 😃 https://github.com/yt-dlp/yt-dlp/commit/48416bc4a8f1d5ff07d5977659cb8ece7640dcd8