[YouTube] Don't throw an exception when there is no banner available on a channel #1086
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.
I tested my changes by using a temporary unit test with the channel from which the issue has been found and another one with which the issue was reproducible (see below).
On YouTube, channels may not have a banner, so no exception should be thrown if no banner is found. This PR makes
YoutubeChannelExtractor.getBannerUrl
returningnull
when there is no banner instead of throwing aParsingException
, like it was the case before (the current behavior has been introduced in #1050).As
carouselHeaderRender
s do not contain a banner, I tested this behavior in the corresponding test method and test class (testBannerUrl
inYoutubeChannelExtractorTest.CarouselHeader
).This bug has been originally reported in this comment in the issue of NewPipe v0.25.2's release.