Skip to content

Commit

Permalink
Extract Channel Avatar in related videos.
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMasterK committed Sep 3, 2021
1 parent f0aa46b commit feb09e9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,16 @@ public String getUploaderUrl() throws ParsingException {
@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;
}

Expand Down

0 comments on commit feb09e9

Please sign in to comment.