Skip to content

[YouTube] Fix nsig parsing, fix timestamps being turned to text, fix tests#1443

Merged
Stypox merged 8 commits intoTeamNewPipe:devfrom
Stypox:fix-tests
Jan 28, 2026
Merged

[YouTube] Fix nsig parsing, fix timestamps being turned to text, fix tests#1443
Stypox merged 8 commits intoTeamNewPipe:devfrom
Stypox:fix-tests

Conversation

@Stypox
Copy link
Copy Markdown
Member

@Stypox Stypox commented Jan 27, 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.

Followup to #1438

This is the timestamp fix:

Before After
Before After

For the n-sig parsing, I took inspiration from https://github.com/yt-dlp/yt-dlp/blob/e08fdaaec2b253abb1e08899d1d13ec5072d76f2/yt_dlp/extractor/youtube/jsc/_builtin/vendor/yt.solver.core.js#L86 and yt-dlp/ejs@e91d03f . The test now passes and the function gets extracted correctly, though I didn't test if the signatures are actually deobfuscated properly, since they are now used anywhere at the moment.

One of the tests had to be removed since I could not find a channel which has that message, and according to https://youtube.fandom.com/wiki/Termination#Ban_Messages that message is "deprecated" so maybe it does not exist anymore.
Now YouTube returns just "{}" without any better explanation, so ParsingException is thrown by the extractor. Now users won't get told that the video they are trying to watch does not exist at all, but since YouTube literally provides an empty JSON response we have no way to detect if the video does not exist or if there is some other bug in the way we make requests that causes an empty response.
@Stypox Stypox added this to v0.28.x Jan 28, 2026
@github-project-automation github-project-automation Bot moved this to Todo in v0.28.x Jan 28, 2026
@Stypox Stypox moved this from Todo to In Progress in v0.28.x Jan 28, 2026
@Stypox
Copy link
Copy Markdown
Member Author

Stypox commented Jan 28, 2026

I'm merging now to do the hotfix release, feel free to leave a review later and I will take care of addressing any issues

@Stypox Stypox merged commit 251f7f6 into TeamNewPipe:dev Jan 28, 2026
2 of 4 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in v0.28.x Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant