Improve based on review/feedback.
This commit is contained in:
parent
b9fad4fcc8
commit
0ba03c552c
|
@ -168,7 +168,8 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
|
|||
public String getUploaderAvatarUrl() throws ParsingException {
|
||||
|
||||
if(videoInfo.has("channelThumbnailSupportedRenderers")) {
|
||||
return JsonUtils.getArray(videoInfo, "channelThumbnailSupportedRenderers.channelThumbnailWithLinkRenderer.thumbnail.thumbnails").getObject(0).getString("url");
|
||||
return JsonUtils.getArray(videoInfo, "channelThumbnailSupportedRenderers.channelThumbnailWithLinkRenderer.thumbnail.thumbnails")
|
||||
.getObject(0).getString("url");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -88,7 +88,7 @@ public class StreamInfoItem extends InfoItem {
|
|||
return uploaderAvatarUrl;
|
||||
}
|
||||
|
||||
public void setUploaderAvatarUrl(String uploaderAvatarUrl) {
|
||||
public void setUploaderAvatarUrl(final String uploaderAvatarUrl) {
|
||||
this.uploaderAvatarUrl = uploaderAvatarUrl;
|
||||
}
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ public class YoutubeSearchExtractorTest {
|
|||
@Test
|
||||
public void testUploaderAvatar() throws IOException, ExtractionException {
|
||||
final List<InfoItem> items = extractor.getInitialPage().getItems();
|
||||
for (InfoItem item : items) {
|
||||
for (final InfoItem item : items) {
|
||||
assertNotNull(((StreamInfoItem) item).getUploaderAvatarUrl());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue