Skip to content

Commit 904c9d6

Browse files
committed
Fix YouTube videos with no views
1 parent 65a7eda commit 904c9d6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ public long getViewCount() throws ParsingException {
279279
if (views == null) throw new ParsingException("Could not get view count");
280280
}
281281

282+
if (views.toLowerCase().contains("no views")) return 0;
283+
282284
return Long.parseLong(Utils.removeNonDigitCharacters(views));
283285
}
284286

0 commit comments

Comments
 (0)