Skip to content

Conversation

@AudricV
Copy link
Member

@AudricV AudricV commented Jul 31, 2025

  • 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 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.

@AudricV AudricV added enhancement New feature or request youtube service, https://www.youtube.com/ labels Jul 31, 2025
AudricV added 6 commits July 31, 2025 21:00
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.
@AudricV AudricV force-pushed the yt_more_kiosks_and_trending_deprecation branch from be60358 to 1ff4384 Compare July 31, 2025 19:01
AudricV added 3 commits July 31, 2025 21:10
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.
@AudricV AudricV force-pushed the yt_more_kiosks_and_trending_deprecation branch from 1ff4384 to 2cccf48 Compare July 31, 2025 19:11
@Stypox Stypox added this to v0.28.x Jul 31, 2025
@github-project-automation github-project-automation bot moved this to Todo in v0.28.x Jul 31, 2025
@Stypox Stypox moved this from Todo to In Progress in v0.28.x Jul 31, 2025
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.

Thank you! I re-reviewed again and things look good, and tested out from within NewPipe and kiosks seem to work well.

@Stypox Stypox merged commit 0a7b72a into TeamNewPipe:dev Jul 31, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in v0.28.x Jul 31, 2025
@AudricV AudricV deleted the yt_more_kiosks_and_trending_deprecation branch July 31, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request youtube service, https://www.youtube.com/

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants