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

Tutorial to extract functions from minified javascript file #71

Open
wil2106 opened this issue Jan 28, 2025 · 3 comments
Open

Tutorial to extract functions from minified javascript file #71

wil2106 opened this issue Jan 28, 2025 · 3 comments

Comments

@wil2106
Copy link

wil2106 commented Jan 28, 2025

From what I understand, YouTube protects itself from video/audio downloading by regularly changing its minified JavaScript files, which makes the extraction regexes obsolete. It would be really cool to have a tutorial explaining how to find the new regex patterns for compressed code so we can update the code ourselves without waiting for new versions of the library.

@alexeichhorn
Copy link
Owner

Appreciate you wanting to help. But unfortunately, it's not that simple. Changes can occur all over the place - not just in the regex for the JavaScript. I think in the end, the best solution is to dramatically improve the .remote option, which is reliant on yt-dlp at the moment. So it is updated super quickly usually and deploys back to the old version. Currently, however, it's super slow due to high load and even if deployed separately, noticeably slower than the .local method. If I can bring it to Cloudflare Workers, this could improve a lot, I hope.

@jcltravels
Copy link

@alexeichhorn Are you able to share/post the code for the server deployment - I was hoping to host my own .remote server using modified/local copy of the package?

@alexeichhorn
Copy link
Owner

It's public at https://github.com/alexeichhorn/YouTubeKit-Server
No documentation yet, but should be pretty simple. You can just use .remote(serverURL: <your server url>) in YouTubeKit then.

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