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

Always return whatever YouTube provides when filtering search #1146

Open
Stypox opened this issue Dec 30, 2023 · 0 comments
Open

Always return whatever YouTube provides when filtering search #1146

Stypox opened this issue Dec 30, 2023 · 0 comments
Labels
discussion This needs to be discussed before anything is done youtube service, https://www.youtube.com/

Comments

@Stypox
Copy link
Member

Stypox commented Dec 30, 2023

} else if (extractVideoResults && item.has("videoRenderer")) {
collector.commit(new YoutubeStreamInfoItemExtractor(
item.getObject("videoRenderer"), timeAgoParser));
} else if (extractChannelResults && item.has("channelRenderer")) {
collector.commit(new YoutubeChannelInfoItemExtractor(
item.getObject("channelRenderer")));
} else if (extractPlaylistResults && item.has("playlistRenderer")) {
collector.commit(new YoutubePlaylistInfoItemExtractor(
item.getObject("playlistRenderer")));
}

This snippet comes from YouTube search extractor's collectStreamsFrom. At the moment we are using these boolean values to only return the requested type of items (e.g. channels) even if YouTube provides some other unrequested item types (e.g. the channel's videos).

In my opinion the extractor should be transparent to such inconsistencies, and just return whatever YouTube provides. Basically, in my opinion b71ce11 should be reverted. What do you think @FireMasterK @AudricV?

@AudricV AudricV added youtube service, https://www.youtube.com/ discussion This needs to be discussed before anything is done labels Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This needs to be discussed before anything is done youtube service, https://www.youtube.com/
Projects
None yet
Development

No branches or pull requests

2 participants