question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[YouTube] nsig extraction now fails

See original GitHub issue

Checklist

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
pukkandancommented, Feb 1, 2022

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

3reactions
pukkandancommented, Feb 1, 2022

Youtube is throttling all formats. But our android fallback “unthrottles” most

Read more comments on GitHub >

github_iconTop Results From Across the Web

[youtube] nsig extraction failed: You may experience throttling ...
The issue was that the more complex nsig decryption function now includes curly braces inside strings, which the findNextParenthesis function ...
Read more >
yt-dlp downloads are suddenly very slow, mentioning "nsig ...
I found, on a non-YouTube site, that yt-dlp would occasionally throw an error saying that it needed PhantomJS and then abort the download....
Read more >
Porteus switched from youtube-dl to yt-dlp - Page 2
WARNING: [youtube] yMXL4NiKJ0A: nsig extraction failed: You may experience throttling for some formats Install PhantomJS to workaround the ...
Read more >
youtube-dl failed to extract signature - Ask Ubuntu
You are getting this error: Unable to extract Initial JS player signature function name ...because youtube-dl is not up-to-date. Google has been changing ......
Read more >
youtube-dl fails on some music videos (Signature extraction ...
Hello I'm having a yt-dl bug from when I go to! Download failed for https/www.youtube.com/watch?v=bW0cLEFkSlE; exit status 1 I downloaded ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found