[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:
parent
39a911db9f
commit
f1fa84b4e3
|
@ -282,7 +282,10 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
|
||||||
))
|
))
|
||||||
.filter(url -> !url.contains("s.ytimg.com") && !url.contains("default_banner"))
|
.filter(url -> !url.contains("s.ytimg.com") && !url.contains("default_banner"))
|
||||||
.map(YoutubeParsingHelper::fixThumbnailUrl)
|
.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
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue