fent / node-ytdl-core

YouTube video downloader in javascript.
MIT License
4.53k stars 805 forks source link

Rumor about breaking changes? #364

Closed ThatTonybo closed 6 years ago

ThatTonybo commented 6 years ago

More of a discussion- sorry if it's the wrong place.

There's been certain rumors about "breaking changes" in some communities in. Apparently, YouTube has changed around their streams or something, and has rendered ytdl-core.. useless?

I'd love to know more about this, and possibly clear up any confusion. Thanks in advance! 😄

LiamTownsley commented 6 years ago

@fent

fent commented 6 years ago

Haven't heard these rumors. Where are they coming from?

ytdl-core is working right now.

Vorror commented 6 years ago

@fent https://www.xda-developers.com/newpipe-unofficial-youtube-broken-fix/ and https://github.com/rg3/youtube-dl/pull/17464

fent commented 6 years ago

Oh! I wasn't aware of that.

I just ran the tests and they pass, and streaming a video is working too. The way ytdl-core extracts the signature is a bit different than the way youtube-dl does it: https://github.com/fent/node-ytdl-core/blob/master/lib/sig.js#L93-L131

It doesn't search where "signature" is set, it instead searches for code that looks like decrypting functions.

And I wish all of these yt downloaders could be consolidated into a single library that is then compiled into different environments: node, python, go, java. But afaik there isn't a tool to help us do that. Right now, whenever there's a change with yt's website and its api's, we all have to change our libraries separately.

fent commented 6 years ago

My extraction method isn't perfect either. There's some variable names there, which are not guaranteed, and some syntax that could look different depending on compression settings.

Ideally, we'd have a piece of code that does something, has a certain structure, and then gets parsed, and the syntax is searched in the compressed and obfuscated html5player file.

I might work on something that does that some time later.

ThatTonybo commented 6 years ago

So, ytdl-core is still fine to be using?

I was mainly thinking oh they changed it we're all doomed run, and I was an idiot and didn't run any tests or try it, just some straight here to see what was up, silly me I guess.

Sounds annoying though, it'd be great to have a unified library, or just a core get library that everyone can request to and use, so one change would fix all. All in a perfect world, eh.

Thanks for the answers so far however, it's great to be reassured that all my various projects using ytdl-core and such are all going to mostly work fine.

paixlukee commented 6 years ago

ok