Skip to content

Commit 8a9ae32

Browse files
authored
Merge pull request #292 from wb9688/fix-yt-no-views
Fix YouTube videos with no views
2 parents 6fd9b38 + 904c9d6 commit 8a9ae32

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)