used regex to delete spaces inside parseLong() argument

pull/199/head
Tomasz Marzeion 2016-02-20 13:49:47 +01:00
rodzic a1a12ca9f7
commit 80dae6ece7
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -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()