-
Notifications
You must be signed in to change notification settings - Fork 10k
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_dl.utils.ExtractorError: Could not find JS function 'na' #30363
Comments
Looks like youtube-dl needs to update the signature function regex. There is no issue in yt-dlp, seems like this was avoided by yt-dlp/yt-dlp#641. Back-porting them from yt-dlp works. Relevant code: Edit: Given the above patch by yt-dlp/yt-dlp#641, it may be possible that future player js versions may work again (but also break again at times for the same reason) with existing code. |
Having the same issue when trying to resume from an existing partial download.
Can confirm that it works with yt-dlp. |
Ran into the same issue when tried to use youtube-dl with audio-format mp3
With yt-dlp though, this problem does not occur. |
I am also having this issue, which is impacting Discord bot I maintain.
|
I am having this extraction/ no 'na' function issue too, but i'm not very savvy with code or python at all. I am using the .exe version of yt-dlg to run youtube-dl, which probably makes a difference. |
confirmed yt-dlp pull request above fixed this issue for me. Must have been youtube switching their 2 char lookup? |
I also have this problem of not being able to download more videos or mp3 audios. |
Having this issue with most youtube URLs (succeeded in downloading one of my own uploads) I think like others here
|
I have submitted a PR (#30366) that resolves this issue. It looks like no PRs have been merged to master in quite some time now, so if you're really in a pinch to resolve this quickly, consider making the changes yourself to extractor/youtube.py in your local environments according to the changes in #30366 , as it is a simple fix (if you are brazen enough to do so). The problem lies in that Youtube has apparently made some change in their base.js such that the signature parser is taking issue with changes evident in the function signature format. Most are 2 characters (as the regex in the parser assumes) but it seems that 2 characters can no longer be assumed after their update for these signatures. Just needed to tweak the regex to account for that, and I haven't been able to replicate any of these issues since. You can see this for yourself by reviewing base.js at this link: https://www.youtube.com/s/player/850eb2bc/player_ias.vflset/en_US/base.js Note that this finding was originally made in this PR for yt-dlp and is not mine: yt-dlp/yt-dlp#641. This fix for yt-dlp was spotted by @coletdjnz (good spot) in his earlier comment to this thread. |
the link to @lanegramling PR is wrong, to see what @lanegramling has changed to reapply to local files see 1a09168 It's quite easy, only 4 lines need changing, all at one place. You just need a few commas in regex. |
Good catch, thanks for letting me know. I have updated the links in my comment. |
[youtube] Fix function signature parser (refs ytdl-org/ytdl-org#30363)
Allright. But how I can install the fixed version? |
Review this issue. It may take some time. TL;DR If you have patched against that throttling issue (I don't imagine you would be using yt-dl otherwise), just repeat the procedure. |
same problem here |
Same issue on Fedora 35:
|
I need a solution for my Discord bot written in python please help me with this issue |
YTSearch has the same issue as well C:\SYS586>c:\sys586\youtube-dl "ytsearch5:DO THEY KNOW ITS CHRISTMAS" --get-id --get-title |
Unsurprising, and also fixed by PR #30366. When yt-dl processes a playlist, channel, or search, it tries to resolve metadata for each item found, similar to running yt-dl with |
Yeah, I recommend to use yt-dlp or smthn like this, because there is no bug and creators support their creation and i use module in js (yt-dlp-exec) , which has no changes with old and good youtube-dl-exec. |
I have the same problem on Linux $ youtube-dl -f 18 https://www.youtube.com/watch?v=yl8It450z-E =============================================== < Here is complete output with --verbose flag > During handling of the above exception, another exception occurred: Traceback (most recent call last): |
already saw some files are change, hope it will be works 😞 |
This brings up an issue in Github. Some of the better programs have dozens, even hundreds, of branches. A system of grading the variants would be useful, at least an icon in the listing to indicate no change/activity in the branch. |
yt-dlp has the same issue |
I just installed the latest version from pip and it works. Make sure you've updated yt-dlp. |
I switched to yt-dlp. One unexpected benefit: download speed is much better (youtube-dl got slower and slower in the last few months. I thought this was google throttling me and shrugged) |
I had the exact same observation and experience. |
Official YT-DL working! Big big thanks for developers. Love u |
It was, if you hadn't applied the patch from PR #30184. |
A Xmas bonus I thinks guys well done 👍🏼 |
* commit '905d1d281ddfa5d183fc445010d350cefc6a58ec': Implement n-param descrambling using JSInterp Refactor JSInterpreter._separate Back-port test_youtube_signature.py from yt-dlp and fix JSInterp accordingly Fix splice to handle float Handle default in switch better Back-port JS interpreter upgrade from yt-dlp PR ytdl-org#1437 release 2021.12.17 [ChangeLog] Actualize [ci skip] Add compat_map/filter and use the former [youtube] Fix function signature parser (refs ytdl-org/ytdl-org#30363) # Conflicts: # youtube_dl/jsinterp.py # youtube_dl/version.py
* commit 'afaec67d45df19642eb4af230b506127af84ceff': Fixes 404 Issue Currently Present On XVIDEOS.COM release 2021.12.17 [ChangeLog] Actualize [ci skip] [youtube] Update signature function patterns (closes ytdl-org#30363) (ytdl-org#30366)
This comment works for me :) |
Checklist
Verbose log
Description
Trying to download video with either url or just video code returns the indicated error
The text was updated successfully, but these errors were encountered: