-
-
Notifications
You must be signed in to change notification settings - Fork 494
[YouTube] Add support for more kiosks and change default one #1354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Stypox
merged 13 commits into
TeamNewPipe:dev
from
AudricV:yt_more_kiosks_and_trending_deprecation
Jul 31, 2025
Merged
[YouTube] Add support for more kiosks and change default one #1354
Stypox
merged 13 commits into
TeamNewPipe:dev
from
AudricV:yt_more_kiosks_and_trending_deprecation
Jul 31, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kiosks structure work in a very similar way to channel tabs, so YoutubeChannelHelper is used in this abstract class.
This is the client for YouTube Charts (charts.youtube.com). Also change nullability of two fields and fix wrong client constant usage in ofWebEmbeddedPlayerClient method in InnertubeClientRequestInfo. Usages in YoutubeParsingHelper have been updated, getClientHeaders and prepareJsonBuilder methods in this class have been made public.
This kiosk also returns some videos for unsupported YouTube Charts countries, even if there are fewer than in a supported country.
This kiosk is meant to return official music videos, but it also returns unofficial content and autogenerated tracks, hence the kiosk name. Making requests with an unsupported YouTube Charts country leads to a 400 HTTP error, so for these countries a ContentNotSupportedException is thrown by the extractor.
Trending is still working at the time this commit is made, it has been just removed from the interface. Also remove getInstance method of YoutubeTrendingLinkHandlerFactory to make the INSTANCE static field public, for consistency with other kiosks of the service.
be60358 to
1ff4384
Compare
Also move YoutubeKioskExtractorTest.Trending at the bottom of the file and add deprecation notice on test class too.
This allows client to distinguish of a generic ContentNotSupportedException, which hasn't fully its place for its usage in YouTube Charts.
1ff4384 to
2cccf48
Compare
11 tasks
Stypox
approved these changes
Jul 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I re-reviewed again and things look good, and tested out from within NewPipe and kiosks seem to work well.
...abi/newpipe/extractor/services/youtube/extractors/kiosk/YoutubeChartsBaseKioskExtractor.java
Show resolved
Hide resolved
.../src/main/java/org/schabi/newpipe/extractor/services/youtube/InnertubeClientRequestInfo.java
Show resolved
Hide resolved
...r/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeKioskExtractorTest.java
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds support for new kiosks and is the extractor implementation for TeamNewPipe/NewPipe#1805:
Note that trends extracted from YouTube Charts (trending movie trailers and trending music clips) are not available in every supported YouTube country: for movie trailers, unsupported countries return a small amount of videos; for trending music, a 400 HTTP error.
For this latest trend, if the requested country is not in the hardcoded list of supported YouTube Charts countries (parsing it dynamically would require an additional request to a YouTube Charts HTML page), a new exception,
UnsupportedContentInCountryException, is thrown (no test has been added for this).This PR set as default kiosk running livestreams, per the current result of TeamNewPipe/NewPipe#12445. The legacy trending kiosk since July 21, 2025 has been kept, as it still works for now (even if the trending URL now redirects to YouTube's homepage).
Invalid usage of the YouTube Music client version for the YouTube web embed client has also been fixed; some additional changes have been done and are detailed in commits.