Skip to content

Commit

Permalink
Update YoutubeCommentsEUVMInfoItemExtractor.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ShareASmile committed Oct 25, 2024
1 parent bdbf2d0 commit 5de1702
Showing 1 changed file with 2 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.schabi.newpipe.extractor.services.youtube.extractors;

import com.grack.nanojson.JsonObject;
import org.schabi.newpipe.extractor.Image;
import org.schabi.newpipe.extractor.Page;
import org.schabi.newpipe.extractor.comments.CommentsInfoItemExtractor;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
Expand All @@ -12,11 +11,9 @@

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Objects;

import static org.schabi.newpipe.extractor.services.youtube.YoutubeDescriptionHelper.attributedDescriptionToHtml;
import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getImagesFromThumbnailsArray;
import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty;

/**
Expand Down Expand Up @@ -68,8 +65,8 @@ public String getUrl() throws ParsingException {

@Nonnull
@Override
public List<Image> getThumbnails() throws ParsingException {
return getUploaderAvatars();
public String getThumbnailUrl() throws ParsingException {
return getUploaderAvatarUrl();
}

@Override
Expand Down Expand Up @@ -154,20 +151,6 @@ public String getUploaderUrl() throws ParsingException {
return "https://www.youtube.com/channel/" + channelId;
}

@Override
public String getUploaderName() throws ParsingException {
return commentEntityPayload.getObject(AUTHOR)
.getString("displayName");
}

@Nonnull
@Override
public List<Image> getUploaderAvatars() throws ParsingException {
return getImagesFromThumbnailsArray(commentEntityPayload.getObject("avatar")
.getObject("image")
.getArray("sources"));
}

@Override
public boolean isHeartedByUploader() {
return "TOOLBAR_HEART_STATE_HEARTED".equals(
Expand Down

0 comments on commit 5de1702

Please sign in to comment.