Extract Channel Avatar in related videos.

This commit is contained in:
FireMasterK 2021-09-03 23:21:01 +05:30
parent f0aa46b008
commit feb09e9997
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -167,11 +167,16 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
@Override @Override
public String getUploaderAvatarUrl() throws ParsingException { public String getUploaderAvatarUrl() throws ParsingException {
if(videoInfo.has("channelThumbnailSupportedRenderers")) { if (videoInfo.has("channelThumbnailSupportedRenderers")) {
return JsonUtils.getArray(videoInfo, "channelThumbnailSupportedRenderers.channelThumbnailWithLinkRenderer.thumbnail.thumbnails") return JsonUtils.getArray(videoInfo, "channelThumbnailSupportedRenderers.channelThumbnailWithLinkRenderer.thumbnail.thumbnails")
.getObject(0).getString("url"); .getObject(0).getString("url");
} }
if (videoInfo.has("channelThumbnail")) {
return JsonUtils.getArray(videoInfo, "channelThumbnail.thumbnails")
.getObject(0).getString("url");
}
return null; return null;
} }