Skip to content
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

[YouTube] Trending is empty sometimes #899

Closed
FireMasterK opened this issue Aug 17, 2022 · 2 comments · Fixed by #920
Closed

[YouTube] Trending is empty sometimes #899

FireMasterK opened this issue Aug 17, 2022 · 2 comments · Fixed by #920
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/

Comments

@FireMasterK
Copy link
Member

FireMasterK commented Aug 17, 2022

On YouTube, NewPipeExtractor returns an empty array of relatedItems.

This affects both Piped and even NewPipe.

Screenshot_20220817-195413_NewPipe

@FireMasterK FireMasterK added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Aug 17, 2022
@AudricV
Copy link
Member

AudricV commented Aug 17, 2022

YouTube is A/B testing a new format data. When updating mocks of a PR, I got the chance to get this new format data!

The access to the trending data tab content is still the same:

contents -> twoColumnBrowseResultsRenderer -> tabs -> tabRenderer -> 0 -> content

The old model is:

sectionListRenderer -> contents -> itemSectionRenderer -> contents -> 0 -> shelfRenderer -> content -> expandedShelfContentsRenderer -> items

The new one is:

richGridRenderer -> contents -> richItemRenderer -> content

Inside each model, we have videoRenderers, which can be already extracted as StreamInfoItems with YoutubeStreamInfoItemExtractor objects.

Note: this new model contains richSectionRenderers, which are for trending shorts and for the recently trending section, which contains in it some of the normal trends.

This new model has so the benefits to only extract the real trending data (limited to the 50 first videos, contrary to the official API which can get up to 200 videos, but that's the same result on YouTube specific trendings (Music, Gaming, Movies)).

@AudricV AudricV changed the title Trending is empty sometimes [YouTube] Trending is empty sometimes Aug 18, 2022
@AudricV
Copy link
Member

AudricV commented Aug 27, 2022

Here is the new UI for reference (sorry for the light theme, I prevented YouTube to store cookies in order to be able to get the new UI easier):

YouTube_FR_new_trending_UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/
Projects
None yet
2 participants