[YouTube] Support lack of video info renderers for streams#968
Merged
FireMasterK merged 3 commits intoTeamNewPipe:devfrom Nov 16, 2022
Merged
Conversation
…oSecondaryInfoRenderer not fatal Also de-duplicated common code related to the obtain of these video info renderers. This change allows extraction of videos without visual metadata.
The video "Makani’s first commercial-scale energy kite" (video ID: An8vtD1FDqs), which has this behavior, is used for the new test, NoVisualMetadataVideoTest, added in YoutubeStreamExtractorDefaultTest. Tests of elements who throw an exception in this case (subscriber count, like count, uploader avatar URL) test if the ParsingException exception is thrown by YoutubeStreamExtractor.
4 tasks
FireMasterK
approved these changes
Nov 5, 2022
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
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 PR makes that for YouTube videos, if
videoPrimaryInfoRendererandvideoSecondaryInfoRendererare missing, the extraction of videos doesn't fail.This allows extraction of videos which have, for an unknown reason, no visual metadata on YouTube clients and makes the extraction of YouTube less "breaking-change" dependent.
For the videos which I talked about above, errors will be raised for uploader subscriber count, like count, and uploader avatar URL (so in NewPipe, toasts with the
Sorry, something went wrongmessage will be shown), as these informations are not available with the InnerTube API without the missing visual metadata.I added a test with a video which has this specificity, "Makani’s first commercial-scale energy kite" (video ID:
An8vtD1FDqs).Fixes TeamNewPipe/NewPipe#5326.