Skip to content

Commit bedcd87

Browse files
committed
Fixed occurrences where voteCount is not set (<=0 likes)
1 parent 545c0a6 commit bedcd87

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsInfoItemExtractor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ public String getTextualVoteCount() throws ParsingException {
9191
* 6
9292
*/
9393
try {
94+
// Sometimes the voteCount is missing
95+
if(!json.has("voteCount")) {
96+
return EMPTY_STRING;
97+
}
98+
9499
final JsonObject voteCountObj = JsonUtils.getObject(json, "voteCount");
95100
if(voteCountObj.isEmpty()) {
96101
return EMPTY_STRING;

0 commit comments

Comments
 (0)