⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@AudricV
Copy link
Member

@AudricV AudricV commented Jan 24, 2026

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

This is the extractor part of the fix for TeamNewPipe/NewPipe#13082. ⚠️ It introduces breaking API changes: as TVHTML5 client won't likely be used anymore, it has be removed ⚠️

See commit messages and code changes for more details about code changes.

TODO:

  • update mocks
  • what to do with YoutubeStreamExtractorDefaultTest.invalidId? The initial response is an empty JSON object, so YoutubeParsingHelper.getValidJsonResponseBody throws a ParsingException
  • fix other failing tests or open an issue for them

@AudricV AudricV added bug Issue is related to a bug ASAP Issue needs to be fixed as soon as possible youtube service, https://www.youtube.com/ labels Jan 24, 2026
@TeamNewPipe TeamNewPipe locked and limited conversation to collaborators Jan 24, 2026
Playability status for the WEB client isn't checked anymore, as it
requires a valid signatureTimestamp from JavaScript player to avoid a
page reload error. Until we can get and use n parameter function
decoding for streaming URLs of HTML5 clients again and support SABR
streams, it doesn't really make sense to fetch a huge JavaScript player
just to get metadata.

Age-restricted content which can be watched with the embedded player is
also broken due to extraction failure and non-ability to run the n
parameter function, so fetching this embedded player has been also
removed and all age-restricted content will throw an
AgeRestrictedContentException.

Playability error status checks have been adapted, as mobile clients get
different error responses than the WEB client.

Some strings have been extracted into constants and a fallback for
unlisted privacy check has been added, in YoutubeStreamExtractor for
both points.
@AudricV AudricV force-pushed the yt_fix-page-reload-required-streams branch from c7c2858 to cfa9854 Compare January 24, 2026 19:39
@TeamNewPipe TeamNewPipe unlocked this conversation Jan 27, 2026
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I had to unlock the conversation otherwise GitHub wouldn't let me post review comments 🤦‍♂️)
Thank you very much! The code looks good to me, and can be merged directly if needed.

Comment on lines 180 to 181
private static final Pattern C_TVHTML5_PLAYER_PATTERN =
Pattern.compile("&c=TVHTML5");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is being kept on purpose?

final JsonObject webPlayerResponse = YoutubeStreamHelper.getWebMetadataPlayerResponse(
localization, contentCountry, videoId);

if (!isPlayerResponseNotValid(webPlayerResponse, videoId)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment explaining why we don't check for playability

if (reason == null) {
final String message = playabilityStatus.getArray("messages").getString(0);
if (message != null && message.contains("private")) {
if (reason != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't the checks for all clients coexist? I assume they wouldn't conflict with each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug youtube service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants