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] Don't throw an exception when there is no banner available on a channel #1086

Merged

Conversation

AudricV
Copy link
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.

…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 is related to a bug youtube service, https://www.youtube.com/ labels Aug 1, 2023
@chirag3103
Copy link

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

@AudricV
Copy link
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
1 check failed
@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 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