2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-08-31 14:26:14 +00:00

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

Channels may not have a banner, so no exception should be thrown if no banner
is found.
This commit is contained in:
AudricV
2023-08-01 12:40:20 +02:00
parent 39a911db9f
commit f1fa84b4e3

View File

@@ -282,7 +282,10 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
))
.filter(url -> !url.contains("s.ytimg.com") && !url.contains("default_banner"))
.map(YoutubeParsingHelper::fixThumbnailUrl)
.orElseThrow(() -> new ParsingException("Could not get banner"));
// Channels may not have a banner, so no exception should be thrown if no banner is
// found
// Return null in this case
.orElse(null);
}
@Override