- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 68
 
Fix for [Issue #78] the latest YouTube Cipher/Deciphering Changes #79
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
base: main
Are you sure you want to change the base?
Conversation
This implementation is based on the fix from YouTube.js PR #953 which uses a global variable to find the signature algorithm instead of relying on hardcoded variable names.
| 
           Thanks for finding a fix so quickly!  | 
    
| 
           There still seems to be an error.  | 
    
| 
           Kind of found what the problem is... 
  | 
    
"Error fix"
NSRegularExpression(#"ytplayer\.config\s*=\s*(\{)"#), ---> Seems to be outdated. Hence commented out
Failed to decode object from given start point:
pattern (ytplayer\.config\s*=\s*) failed: (YouTubeKit.YouTubeKitError1)
applying descrambler
YouTubeKit/RegularExpression.swift:16: Fatal error: Illegal regular expression var (\w+)={[^}]+}
    | 
           This still fails with   | 
    
| 
           I have now commit 76bc73f running, but still get these errors at runtime: 
  | 
    
| 
           @alexeichhorn : Could you please also have a look into this issue. It seems that YTK is currently broken for most of us. Thx!  | 
    
| 
           Hey @atpugvaraa, thanks for your work.  | 
    
| 
           @alexeichhorn thanks for looking into this, i still lack the necessary knowledge and experience to fix things, being only able to make it work locally (without proper error handling seems to be what happened) Thanks a lot for YTK.  | 
    
| 
           Good morning, are there any news on this ? Please keep us updated ! Thank you so much !!!  | 
    
| 
           Internally, it's in a state where some videos work again, but most still have problems. Unfortunately, I just don't have much time currently to put into this.  | 
    
          
 We are very grateful that you initiated and maintain this project and we fully understand that time for open source projects is limited. But since we are using this in a commercial project we have to think about solution. Are you aware of similar projects we could migrate to ? What are the steps when you fix issues like this ? Can we do something to 'incentivate' you ? Regards p.s. Nothing above is meant offensive ! Just thinking about options....  | 
    
| 
           I've written a very hacky solution for this, see my comment in #78.  | 
    
| 
           Please checkout #80 (or branch   | 
    
          
 Fair question. I have written some more things about the future of YouTubeKit in #82, where I also asked some questions. Would appreciate your input there.  | 
    
Pull Request
Description
This implementation addresses the signature algorithm detection issue by implementing a fix based on YouTube.js PR #953. The solution uses a dynamic approach to find the global variable containing the signature algorithm instead of relying on hardcoded variable names, which makes the library more resilient to YouTube's frequent changes.
Related Issues
Changes Made
jsproperty explaining the new signature deciphering approachChecklist
Out of scope
Additional Notes
P.S. This is my first real PR. I am still in a learning phase and moderate use of Artificial Intelligence has been made in order to fix this issue.