node-ytdl-core
node-ytdl-core copied to clipboard
fix: youtube base.js parsing logic
Summary
Youtube again changed the base.js code for more details, you can check this comment
To have stable lib, I suggest approving this refactoring of lib/sig.js file, which was done by @distubejs, and reviewed and improved by me.
Results
Fixed issue: https://github.com/fent/node-ytdl-core/issues/1216
Code tested by me on my own product, also I updated outdated tests. You can use this patch until we make a decision regarding this PR
"ytdl-core": "git+ssh://[email protected]:khlevon/node-ytdl-core.git#v4.11.4-patch.2"
will check the test cases tomorrow
@fent please have a look at this PR, and if you agree, please let's merge it :)
@khlevon Any idea if there are any blockers on merging this? Appreciate the PR!
@ShantanuNair I don't see any blocker. We need someone with merge access to review, approve and merge this PR.
Would you be able to make a version available for me to download and test?
@fent it'd be great if you could give @khlevon access to the repository so he can help with the development!
Você poderia disponibilizar uma versão para eu baixar e testar?
you can use this version while PR is open:
"ytdl-core": "git+ssh://[email protected]:khlevon/node-ytdl-core.git#v4.11.4-patch.2"
Can you merge this PR ? last versions are broken
@khlevon the patch is not working anymore, right?
@khlevon the patch is not working anymore, right?
its still working in my app as of yesterday
@stedel I'm glad to read that. Mine is getting this error since last Wednesday using the patch mentioned above:
2023-09-11T08:33:15.805Z 097f75ee-1b9a-40bc-aaa2-387d1577a90c ERROR evalmachine.<anonymous>:426
Ama=function(a,b,c,d){var e=null;switch(b){case "JSON":try{var f=c.responseText}catch(h){throw d=Error("Error reading responseText"),d.params=a,oC(d),h;}a=c.getResponseHeader("Content-Type")||"";f&&0<=a.indexOf("json")&&(")]};Ila(ncode);
^^^^^^^^^^^^^^^^
SyntaxError: Invalid or unexpected token
at new Script (node:vm:100:7)
at Object.exports2.decipherFormats (/var/task/build/server.cjs:1013223:55)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
at exports2.getInfo (/var/task/build/server.cjs:1013525:21)
Can confirm that this patch does fix #1261 for me. Hoping this gets merged soon!
I say if @fent doesn't get back to us in three months, we have someone who knows what they're doing fork this repo and maintain it. There's just a lot of people wanting to contribute that have great ideas, and this repo might die if we don't do anything about it. There just aren't that many great ytdl's out there.
I say if @fent doesn't get back to us in three months, we have someone who knows what they're doing fork this repo and maintain it. There's just a lot of people wanting to contribute that have great ideas, and this repo might die if we don't do anything about it. There just aren't that many great ytdl's out there.
I second this.
I say if @fent doesn't get back to us in three months, we have someone who knows what they're doing fork this repo and maintain it. There's just a lot of people wanting to contribute that have great ideas, and this repo might die if we don't do anything about it. There just aren't that many great ytdl's out there.
There already is such a fork: https://github.com/distubejs/ytdl-core
Install this over the old one, update your imports to point at the new ytdl, and it should just work.