Merge pull request #725 from FireMasterK/related-uploader-avatar

Extract Channel Avatar in related videos.
This commit is contained in:
Tobi 2021-09-03 22:14:28 +02:00 committed by GitHub
commit 62b87552f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

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