Skip to content
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

fix(Player): Fix signature algorithm extraction #832

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

absidue
Copy link
Collaborator

@absidue absidue commented Dec 9, 2024

There is probably a cleaner way to handle this but this gets it working.

@bcomnes
Copy link

bcomnes commented Dec 10, 2024

This fixes the YOUTUBEJS][Player]: Failed to extract signature decipher algorithm. stdout message when creating the player, but this doesn't seem to work with the onesierequest approach. All content 403s.

@Andrews54757
Copy link

Andrews54757 commented Dec 10, 2024

I believe this is because the n-sig decipher is failing due to a missing variable.

fyn = function(J) {
    // ... nsig prelude.
    if (typeof uwg === "undefined") return J; // This is triggered because uwg is not defined
    // ...rest of nsig function.
}; fyn(nsig);

To fix, add this replace call:

nsig_function.result.replace(/if\(typeof [a-zA-Z0-9]*==="undefined"\)return [a-zA-Z0-9]*;/, '')

@absidue
Copy link
Collaborator Author

absidue commented Dec 10, 2024

Okay so in conclusion this PR is working correctly, it's just that there are also issues with the nsig stuff that this PR wasn't intended to solve as it's for the sig stuff not nsig stuff.

@LuanRT LuanRT merged commit ce4996c into LuanRT:main Dec 10, 2024
4 checks passed
@absidue absidue deleted the fix-sig-extraction branch December 10, 2024 12:50
bcomnes added a commit to hifiwi-fi/yt-dlp-api that referenced this pull request Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants