Fixed NumberFormatException when processing likes

See also #7525
This commit is contained in:
litetex 2021-12-27 16:50:08 +01:00
parent 65687f3b9b
commit a6961c5efa
1 changed files with 4 additions and 0 deletions

View File

@ -358,6 +358,10 @@ public class YoutubeStreamExtractor extends StreamExtractor {
return -1;
}
if (likesString.toLowerCase().contains("no likes")) {
return 0;
}
return Integer.parseInt(Utils.removeNonDigitCharacters(likesString));
} catch (final NumberFormatException nfe) {
throw new ParsingException("Could not parse \"" + likesString + "\" as an Integer",