Skip to content

[YouTube] Don't throw an exception when there is no banner available on a channel#1086

Merged
TobiGr merged 2 commits intoTeamNewPipe:devfrom
AudricV:yt_no-exception-channels-without-banner
Aug 2, 2023
Merged

[YouTube] Don't throw an exception when there is no banner available on a channel#1086
TobiGr merged 2 commits intoTeamNewPipe:devfrom
AudricV:yt_no-exception-channels-without-banner

Conversation

@AudricV
Copy link
Copy Markdown
Member

@AudricV AudricV commented Aug 1, 2023

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
    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 returning null when there is no banner instead of throwing a ParsingException, like it was the case before (the current behavior has been introduced in #1050).

As carouselHeaderRenders do not contain a banner, I tested this behavior in the corresponding test method and test class (testBannerUrl in YoutubeChannelExtractorTest.CarouselHeader).

This bug has been originally reported in this comment in the issue of NewPipe v0.25.2's release.

AudricV added 2 commits August 1, 2023 12:40
…on a channel

Channels may not have a banner, so no exception should be thrown if no banner
is found.
@AudricV AudricV added bug Issue or PR is related to a bug YouTube Service, https://www.youtube.com/ labels Aug 1, 2023
@chirag3103
Copy link
Copy Markdown

Build and test is failing on CI. Also you may have to explicitly add reviewers on your PR to get approvals

@AudricV
Copy link
Copy Markdown
Member Author

AudricV commented Aug 2, 2023

The test failures are unrelated to this PR (Bandcamp service) and are already fixed by #1082.

About reviews, team members working on the extractor look at PRs without having to request a review.

@TobiGr TobiGr merged commit 9a59afb into TeamNewPipe:dev Aug 2, 2023
@AudricV AudricV deleted the yt_no-exception-channels-without-banner branch August 2, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue or PR is related to a bug YouTube Service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants