youtube-dl: [youtube] Unable to decode n-parameter: download likely to be throttled
Checklist
-
I’m reporting a broken site support
-
I’ve verified that I’m running youtube-dl version 2021.12.17
./youtube-dl --version
2021.12.17
– NOTE!!!: Custom build from Master Working until recently. See: Issue30583
-
I’ve checked that all provided URLs are alive and playable in a browser – URL plays normally in BraveBrowser: https://www.youtube.com/watch?v=lDqlpTcxLqg
-
I’ve checked that all URLs and arguments with special characters are properly quoted or escaped – NOTE: using shell script so calls are consistent.
COMMAND STRING: /media/media3/ytu/youtube-dl -v --console-title --verbose -f best[height<=?1080]/bestvideo[height<=?1080]+bestaudio --merge-output-format mp4 --write-thumbnail --write-description --write-info-json --ignore-errors --max-downloads 50 --no-overwrites --restrict-filenames --download-archive /media/media3/ytu/archive-video.txt --no-playlist --output /home/uc/Videos/ytu/%(uploader)s/%(title)s-%(id)s.%(ext)s https://www.youtube.com/watch?v=lDqlpTcxLqg
-
I’ve searched the bugtracker for similar issues including closed ones – Search Term yielded no results: “Unable to decode n-parameter”
Verbose log
Geting single URL ( dont get entire playlist )
NOT using BATCHFILE, using https://www.youtube.com/watch?v=lDqlpTcxLqg
COMMAND STRING: /media/media3/ytu/youtube-dl -v --console-title --verbose -f best[height<=?1080]/bestvideo[height<=?1080]+bestaudio --merge-output-format mp4 --write-thumbnail --write-description --write-info-json --ignore-errors --max-downloads 50 --no-overwrites --restrict-filenames --download-archive /media/media3/ytu/archive-video.txt --no-playlist --output /home/uc/Videos/ytu/%(uploader)s/%(title)s-%(id)s.%(ext)s https://www.youtube.com/watch?v=lDqlpTcxLqg
Timestamp:
[R]un or Run & [T]ail? Options:[r/t]r
Typed: r
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--console-title', u'--verbose', u'-f', u'best[height<=?1080]/bestvideo[height<=?1080]+bestaudio', u'--merge-output-format', u'mp4', u'--write-thumbnail', u'--write-description', u'--write-info-json', u'--ignore-errors', u'--max-downloads', u'50', u'--no-overwrites', u'--restrict-filenames', u'--download-archive', u'/media/media3/ytu/archive-video.txt', u'--no-playlist', u'--output', u'/home/uc/Videos/ytu/%(uploader)s/%(title)s-%(id)s.%(ext)s', u'https://www.youtube.com/watch?v=lDqlpTcxLqg']
[debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 2.7.17 (CPython) - Linux-4.15.0-20-generic-x86_64-with-LinuxMint-19.1-tessa
[debug] exe versions: ffmpeg 3.4.8, ffprobe 3.4.8
[debug] Proxy map: {}
[youtube] lDqlpTcxLqg: Downloading webpage
[youtube] Downloading just video lDqlpTcxLqg because of --no-playlist
[youtube] lDqlpTcxLqg: Downloading MPD manifest
[youtube] lDqlpTcxLqg: Downloading player c5a4daa1
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
funcname = self._extract_n_function_name(jscode)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
funcname = self._extract_n_function_name(jscode)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
funcname = self._extract_n_function_name(jscode)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
funcname = self._extract_n_function_name(jscode)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
funcname = self._extract_n_function_name(jscode)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last):
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1514, in _n_descramble
self._player_cache[player_id] = self._extract_n_function(video_id, player_url)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1487, in _extract_n_function
funcname = self._extract_n_function_name(jscode)
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/youtube.py", line 1476, in _extract_n_function_name
'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
File "/media/media3/ytu/youtube-dl/youtube_dl/extractor/common.py", line 910, in _parse_json
raise ExtractorError(errmsg, cause=ve)
ExtractorError: dx: Failed to parse JSON (caused by ValueError('No JSON object could be decoded',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
)
[info] Writing video description to: /home/uc/Videos/ytu/DarkJournalist/Dark_Journalist_Special_Report_-_DHS_CIA_UFO_Takeover-lDqlpTcxLqg.description
[info] Writing video description metadata as JSON to: /home/uc/Videos/ytu/DarkJournalist/Dark_Journalist_Special_Report_-_DHS_CIA_UFO_Takeover-lDqlpTcxLqg.info.json
[youtube] lDqlpTcxLqg: Downloading thumbnail ...
[youtube] lDqlpTcxLqg: Writing thumbnail to: /home/uc/Videos/ytu/DarkJournalist/Dark_Journalist_Special_Report_-_DHS_CIA_UFO_Takeover-lDqlpTcxLqg.jpg
[debug] Invoking downloader on u'https://rr3---sn-5go7yne6.googlevideo.com/videoplayback?expire=1653403020&ei=LJmMYsOaLsSUyAX8gJr4Bw&ip=128.127.104.80&id=o-AK3bmBCB8bG0x5mh5jrXLX9dSeDwQeJqETejstHzHLcP&itag=22&source=youtube&requiressl=yes&mh=vG&mm=31%2C29&mn=sn-5go7yne6%2Csn-5goeen7y&ms=au%2Crdu&mv=m&mvi=3&pl=23&initcwndbps=342500&spc=4ocVC1uVM1AIxWBmDhtHnUpX3h1d&vprv=1&mime=video%2Fmp4&ns=hF1g8npJN37xcxHTDFZb2FAG&cnr=14&ratebypass=yes&dur=6548.491&lmt=1653192575993965&mt=1653380939&fvip=2&fexp=24001373%2C24007246&c=WEB&txp=7211224&n=ASAJjGCGLHbscuiSQUm&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Cmime%2Cns%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAK7al3JgSvd8vF05prUjeK1nxGxrRAAiDIJgqur2h2nJAiEArmwXj6-wqwMK2g46tpjyTw2eA093KJA5DVIblEE1Ye4%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgINepUqsFnniJTPM6LFH8A99J7ztZQblYHKzObHmuI6cCIQDGMwIEcK1EZBbVKz5f6ih2kK-bVlN1NOn8gU6oJpEsDg%3D%3D'
[download] Destination: /home/uc/Videos/ytu/DarkJournalist/Dark_Journalist_Special_Report_-_DHS_CIA_UFO_Takeover-lDqlpTcxLqg.mp4
[download] 0.2% of 863.08MiB at 68.31KiB/s ETA 03:35:16
Description
- Started seeing the following error for youtube URLs about a week ago ( estimated, hadn’t used in about 2 weeks ) - with our lovely throttling ensuing “Unable to decode n-parameter”
- NOTE!!!: Custom build from Master Working until recently. See: Issue30583
- Running from bash script, so COMMAND hasn’t changed.
- Same issue occuring with DIRECT URL and [/videos] URLS ( where youtube-dl generates the list of URLs )
- Saw 429, but this went away when changing VPN to obscure nation/location
- Been through the YouTube throttling game for last year or two - this ‘seems’ like a new permutation.
DISCLAIMER: searched ‘n-parameter’ & didn’t find anything - apologies if this is duplicate. 😃
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- [YouTube] Handle player c5a4daa1 with indirect n-function definition * resolves #30976 — committed to dirkf/youtube-dl by dirkf 2 years ago
- [YouTube] Handle player c5a4daa1 with indirect n-function definition * resolves #30976 — committed to alxlive/youtube-dl by dirkf 2 years ago
- [YouTube] Handle player c5a4daa1 with indirect n-function definition * resolves #30976 — committed to luisriverag/youtube-dl by dirkf 2 years ago
I wonder if #31504 is related.
An exception is being raised in a
catch
block:Apparently we managed to overlook the JS
if
statement! The fix from downstream will be applied shortly.Yes, welcome to player c5a4daa1 where the descrambling function is applied like this:
Patch to catch this:
@dirkf + entire ytdl past/present… Can’t come close to expressing my love & appreciation for the labor put forth on this project. It has literally transformed my life both in terms of making accessible an impossible amount of information, but doing so without the expense of every waking moment.
Prior to ytdl, procuring content was absurd - even with paid apps. This CLI-driven application is EXACTLY what is needed for archivists such as myself in this time of spiritual, culture & information wars. In no small part, I’m confident this project ( and others like it - if they exist ) have made a HUGE impact on the destiny of humanity.
The [VHS Generations] are dropping dead left & right ( even before biohazard was administered under cover of healthcare )… and the bulk of this heritage was pushed to YT. YT has taken upon themselves to fail miserably as a custodian of this heritage - unceremoniously destroying untold volumes of content under direction of mentally unfit review panels with questionable motives. Without [batchable] tools to archive this content, it would be lost to future generations ( excepting those with access to the Akashic Records I suppose ).
Just wanted to take a moment to recognize the team here - as the only time I (and probably everyone else) pop up is when I’m all pissed off & annoyed ( at the situation, not the tool - though its likely impossible to tell the difference).
THANKS!!! & God Bless you Catz!
@dirkf could you please post here when the fix is merged to the main brunch, so we can update youtube-dl (since no new releases are happening)? 🙏
(instead of opening a new dupe about it 😉 )
The last time Google broke the native
JSInterp
was on Oct 11th 2022, with YT-player7a062b77
, which necessitated 6e2626f092c63a5fa22a31df409610b5deaf3968 as a fix… In the last few hours, they’re back 😠 with YT-playerdac945fd
:Downstream also notified… 😄
RE PATCH: CONFIRM FIX
Version Check
execution with no throttling
$ ~/t/git/youtube-dl/youtube-dl https://www.youtube.com/watch?v=YHoYRUUcNY4 [youtube] YHoYRUUcNY4: Downloading webpage [youtube] YHoYRUUcNY4: Downloading player c5a4daa1 [download] Destination: Dark Journalist X-121 - Cayce Atlantean DNA Secret-YHoYRUUcNY4.f398.mp4 [download] 8.3% of 941.60MiB at 3.33MiB/s ETA 04:19
make output