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

403 Error for Encrypted Videos #99

Closed
rustynail1984 opened this issue Feb 23, 2021 · 7 comments
Closed

403 Error for Encrypted Videos #99

rustynail1984 opened this issue Feb 23, 2021 · 7 comments

Comments

@rustynail1984
Copy link

Hi there,

i think the Signature Decoder is broken, i got on all Encrypted Videos 403 error.

Example Video: https://www.youtube.com/watch?v=2vjPBrBU-TM

@5wcx
Copy link

5wcx commented Feb 23, 2021

me too

@5wcx
Copy link

5wcx commented Feb 23, 2021

@Athlon1600
Copy link
Owner

both of those videos load just fine for me?
https://youtube-downloader-version2.herokuapp.com/

are you sure you're using the latest version AND trying to view that video from the same IP address?

@rustynail1984
Copy link
Author

rustynail1984 commented Feb 27, 2021

Hi.
of course i used the same ip and the latest version.

Now 4 days are over and YouTube has changed the signature algorithm again. I made screenshots of the relevant functions of the base.js. from 4 days ago and today. the reason is the "do" function

4 days ago
23-02-2020
23-02-2020-2

Today
27-02-2020
27-02-2020-2

This is the fix: update RegEx in line 70 of SignatureDecoder.php

// extract all relevant statements within that block
// wm.vY(a,1);
if (preg_match_all('/([a-z0-9$]{2})(\.|(\[["\']))([a-z0-9]{2})(["\']\])?\([^,]+,(\d+)\)/i', $jsCode, $matches) != false)

@Athlon1600
Copy link
Owner

^ right, that would probably work. But the JS player I get back from every video is this:
https://www.youtube.com/s/player/4fe52f49/player_ias.vflset/en_US/base.js

and the code on that looks like this:

no function names in quotes. Can you link me to the player that has that code you're showing?

@rustynail1984
Copy link
Author

Hi,

this was the base,js: https://www.youtube.com/s/player/4fe52f49/player_ias.vflset/de_DE/base.js

As i already said, YouTube changed Sig Algo again and this "do" function is currently not existing anymore in base.js
But this is the reason why it didnt workig at this day (6 days ago). I fixed it at the same day and it was working again.

Maybe you should just change the regex, which serves as a failure protection, in case there is a Sig Algo function in quotes again in the future.

@Athlon1600
Copy link
Owner

Maybe you should just change the regex, which serves as a failure protection, in case there is a Sig Algo function in quotes again in the future.

no harm in that. Done:
https://github.com/Athlon1600/youtube-downloader/releases/tag/v2.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants