Fixed occurrences where voteCount is not set (<=0 likes)

This commit is contained in:
litetex 2021-05-20 21:23:31 +02:00
parent 545c0a6f42
commit bedcd87abb
1 changed files with 5 additions and 0 deletions

View File

@ -91,6 +91,11 @@ public class YoutubeCommentsInfoItemExtractor implements CommentsInfoItemExtract
* 6
*/
try {
// Sometimes the voteCount is missing
if(!json.has("voteCount")) {
return EMPTY_STRING;
}
final JsonObject voteCountObj = JsonUtils.getObject(json, "voteCount");
if(voteCountObj.isEmpty()) {
return EMPTY_STRING;