From ae48bdea4c7afd78fd072561cee1805fecdc6b77 Mon Sep 17 00:00:00 2001 From: golfinq Date: Fri, 5 Mar 2021 02:40:36 -0500 Subject: [PATCH] Updated to reflect variable name change --- .../youtube/extractors/YoutubeCommentsExtractor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java index fa03f7e13..537d8e069 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java @@ -46,7 +46,12 @@ public class YoutubeCommentsExtractor extends CommentsExtractor { @Override public InfoItemsPage getInitialPage() throws IOException, ExtractionException { - final String commentsTokenInside = findValue(responseBody, "commentSectionRenderer", "}"); + String commentsTokenInside; + if (responseBody.contains("commentSectionRenderer")) { + commentsTokenInside = findValue(responseBody, "commentSectionRenderer", "}"); + } else{ + commentsTokenInside = findValue(responseBody, "sectionListRenderer", "}"); + } final String commentsToken = findValue(commentsTokenInside, "continuation\":\"", "\""); return getPage(getNextPage(commentsToken)); }