[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
No known key found for this signature in database
GPG Key ID: DA92EC7905614198
1 changed files with 4 additions and 1 deletions

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