From 80dae6ece73bb37ec55af1a90e57305696638151 Mon Sep 17 00:00:00 2001 From: Tomasz Marzeion Date: Sat, 20 Feb 2016 13:49:47 +0100 Subject: [PATCH] used regex to delete spaces inside parseLong() argument --- .../newpipe/extractor/services/youtube/YoutubeSearchEngine.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSearchEngine.java b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSearchEngine.java index be64fc00d..7e5871959 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSearchEngine.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSearchEngine.java @@ -127,6 +127,7 @@ public class YoutubeSearchEngine implements SearchEngine { .text(); viewCountInfo = viewCountInfo.substring(0, viewCountInfo.indexOf(' ')); viewCountInfo = viewCountInfo.replaceAll("[,.]", ""); + viewCountInfo = viewCountInfo.replaceAll("\\s",""); resultItem.view_count = Long.parseLong(viewCountInfo); Element te = item.select("div[class=\"yt-thumb video-thumb\"]").first()