TeamNewPipe / NewPipeExtractor

NewPipe's core library for extracting data from streaming sites
GNU General Public License v3.0
1.4k stars 421 forks source link

[YouTube] Update clients versions, restore access to some streams and more #1168

Closed AudricV closed 7 months ago

AudricV commented 7 months ago

This PR updates YouTube hardcoded clients' versions to newer ones and removes usage of InnerTube API keys, as official clients do not use them anymore in all endpoints we use.

It also restores the availability some streams (itag 22 on musical videos, itag 139 (+DRC audio streams - used for stable audio feature on mobile apps), when iOS client fetch is not forced, itags 599 and 600) by using new player parameters found to workaround the integrity checks on the official Android app, which requires to pass DroidGuard's VM and to associate a visitor ID to InnerTube requests.

Finally, it adds the missing prettyPrint query parameter to mixes continuations and implements the new crisis meta info action data, while fixing YouTube tests and updating mocks on the fly.

:warning: Breaking changes :warning:

Due to the removal of the usage of InnerTube API keys, some methods in YoutubeParsingHelper which can be used by clients have been changed:

Closes #1112, as it is not relevant anymore, and fixes multiple issues which have been not reported as issues in the extractor/NewPipe's issue tracker.

Theta-Dev commented 7 months ago

I would like to know more about this change. What is DroidGuard's VM? And how did you find out the new player parameters?

AudricV commented 7 months ago

What is DroidGuard's VM?

See this presentation and reVanced threads about fixing the integrity checks which caused playback issues and our current failure to get streams from the ANDROID client in the extractor: https://www.romainthomas.fr/publication/22-sstic-blackhat-droidguard-safetynet/

And how did you find out the new player parameters?

See LuanRT/YouTube.js#624.