From dd6c6ae03fe8824cffdbf807604d4e37fddf8d0f Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sat, 10 Sep 2016 18:47:35 +0200 Subject: [PATCH] seems to made it working --- .../services/youtube/YoutubeChannelExtractor.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelExtractor.java b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelExtractor.java index eb057b6be..d4653d811 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelExtractor.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelExtractor.java @@ -78,7 +78,7 @@ public class YoutubeChannelExtractor extends ChannelExtractor { userUrl = getUserUrl(channelDoc); } - userUrl = userUrl + "/videos?veiw=0&flow=list&sort=dd&live_view=500"; + userUrl = userUrl + "/videos?veiw=0&flow=list&sort=dd&live_view=10000"; String pageContent = downloader.download(userUrl); doc = Jsoup.parse(pageContent, userUrl); nextPageUrl = getNextPageUrl(doc); @@ -92,8 +92,12 @@ public class YoutubeChannelExtractor extends ChannelExtractor { doc = Jsoup.parse(htmlDataRaw, nextPageUrl); String nextPageHtmlDataRaw = ajaxData.getString("load_more_widget_html"); - Document nextPageData = Jsoup.parse(nextPageHtmlDataRaw, nextPageUrl); - nextPageUrl = getNextPageUrl( nextPageData); + if(!nextPageHtmlDataRaw.isEmpty()) { + Document nextPageData = Jsoup.parse(nextPageHtmlDataRaw, nextPageUrl); + nextPageUrl = getNextPageUrl(nextPageData); + } else { + nextPageUrl = ""; + } } catch (JSONException e) { throw new ParsingException("Could not parse json data for next page", e); }