-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[youtube] Unable to decode n-parameter: download likely to be throttled #30976
Comments
i'm having the same problem with the latest version. Installed via: |
Yes, welcome to player c5a4daa1 where the descrambling function is applied like this: ...
$o=function(a){ ...
...
... b=dx[0](b),a.set("n",b) ...
/* 5000 lines later */
var dx=[$o]; ... Patch to catch this: --- old/youtube-dl/youtube_dl/extractor/youtube.py
+++ new/youtube-dl/youtube_dl/extractor/youtube.py
@@ -1471,9 +1471,15 @@
nfunc, idx = re.match(target, nfunc_and_idx).group('nfunc', 'idx')
if not idx:
return nfunc
+ if int_or_none(idx) == 0:
+ real_nfunc = self._search_regex(
+ r'var %s\s*=\s*\[([a-zA-Z_$][\w$]*)\];' % (re.escape(nfunc), ), jscode,
+ 'Initial JS player n function alias ({nfunc}[{idx}])'.format(**locals()))
+ if real_nfunc:
+ return real_nfunc
return self._parse_json(self._search_regex(
r'var %s\s*=\s*(\[.+?\]);' % (re.escape(nfunc), ), jscode,
- 'Initial JS player n function list ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
+ 'Initial JS player n function name ({nfunc}[{idx}])'.format(**locals())), nfunc, transform_source=js_to_json)[int(idx)]
def _extract_n_function(self, video_id, player_url):
player_id = self._extract_player_info(player_url) |
sweet.. will try asap.. there's a dogpile at work so might be until weekend to confirm.. THAT WAS FAST! |
RE PATCH: CONFIRM FIX
Version Check
execution with no throttling$ ~/t/git/youtube-dl/youtube-dl https://www.youtube.com/watch?v=YHoYRUUcNY4 make output
|
See also yt-dlp/yt-dlp#2569 (comment). |
fix working. great job |
@dirkf + entire ytdl past/present... 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). |
With Windows exe 2021.12.17, I'm getting throttled. Based on the patch test posted above, I think this is the patched version, right? I am not prompted for a captcha when I visit the YT page. I apologize if I have missed any other steps to un-throttling, I didn't see anything in the documentation for this situation. Edit to add: After waiting out the download, the "merging formats" step failed with "no such file or directory." |
@dirkf I'm also get throttled.. If this is a duplicate issue, where is an issue where this problem can be tracked? |
I expect you mean https://github.com/ytdl-patched/youtube-dl. See new issue #31164. |
Oups!! Yeap..
I'll monitor this, thank you. 👍 |
(instead of opening a new dupe about it 😉 ) The last time Google broke the native yt-dl -vF "4jduuQh-Uho" =>
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ffmpeg-location', '.\\FFmpeg', '--external-downloader-args', '-v 8 -stats', '-vF', '4jduuQh-Uho']
[debug] Encodings: locale cp1253, fs mbcs, out cp1253, pref cp1253
[debug] youtube-dl version 2023.01.31.114514
[debug] Python version 3.4.4 (CPython) - Windows-Vista-6.0.6003-SP2
[debug] exe versions: ffmpeg n5.2-dev-2245-N-109649-gab8cde6, ffprobe n5.2-dev-2245-N-109649-gab8cde6, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 4jduuQh-Uho: Downloading webpage
WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (Unhandled exception in decode; 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 "D:\a\youtube-dl\youtube-dl\youtube_dl\extractor\youtube.py", line 1524, in _n_descramble
youtube_dl.utils.ExtractorError: Unhandled exception in decode; 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] Available formats for 4jduuQh-Uho:
format code extension resolution note
249 webm audio only tiny 47k , webm_dash container, opus @ 47k (48000Hz), 1.05MiB
250 webm audio only tiny 59k , webm_dash container, opus @ 59k (48000Hz), 1.31MiB
251 webm audio only tiny 105k , webm_dash container, opus @105k (48000Hz), 2.32MiB
140 m4a audio only tiny 129k , m4a_dash container, mp4a.40.2@129k (44100Hz), 2.86MiB
160 mp4 256x144 144p 13k , mp4_dash container, avc1.4d400c@ 13k, 30fps, video only, 310.72KiB
278 webm 256x144 144p 15k , webm_dash container, vp9@ 15k, 30fps, video only, 350.62KiB
242 webm 426x240 240p 22k , webm_dash container, vp9@ 22k, 30fps, video only, 509.02KiB
133 mp4 426x240 240p 23k , mp4_dash container, avc1.4d4015@ 23k, 30fps, video only, 534.08KiB
243 webm 640x360 360p 38k , webm_dash container, vp9@ 38k, 30fps, video only, 865.13KiB
134 mp4 640x360 360p 41k , mp4_dash container, avc1.4d401e@ 41k, 30fps, video only, 938.46KiB
244 webm 854x480 480p 59k , webm_dash container, vp9@ 59k, 30fps, video only, 1.31MiB
135 mp4 854x480 480p 64k , mp4_dash container, avc1.4d401f@ 64k, 30fps, video only, 1.43MiB
247 webm 1280x720 720p 112k , webm_dash container, vp9@ 112k, 30fps, video only, 2.48MiB
136 mp4 1280x720 720p 119k , mp4_dash container, avc1.4d401f@ 119k, 30fps, video only, 2.62MiB
18 mp4 640x360 360p 208k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 4.60MiB
22 mp4 1280x720 720p 247k , avc1.64001F, 30fps, mp4a.40.2 (44100Hz) (best) Downstream also notified... 😄 |
I wonder if #31504 is related. An exception is being raised in a
Apparently we managed to overlook the JS |
@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)? 🙏 |
Continued in #31509. |
Checklist
I'm reporting a broken site support
I've verified that I'm running 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
Description
"Unable to decode n-parameter"
DISCLAIMER: searched 'n-parameter' & didn't find anything - apologies if this is duplicate. :)
The text was updated successfully, but these errors were encountered: