1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-23 03:22:37 +01:00

Merge pull request #199 from szafir1100/develop

used regex to delete spaces inside parseLong() argument
This commit is contained in:
Christian Schabesberger 2016-02-21 01:40:50 +01:00
commit 96928d46ca

View File

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