Skip to content

Commit ae48bde

Browse files
authored
Updated to reflect variable name change
1 parent 9256b3b commit ae48bde

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeCommentsExtractor.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ public YoutubeCommentsExtractor(StreamingService service, ListLinkHandler uiHand
4646

4747
@Override
4848
public InfoItemsPage<CommentsInfoItem> getInitialPage() throws IOException, ExtractionException {
49-
final String commentsTokenInside = findValue(responseBody, "commentSectionRenderer", "}");
49+
String commentsTokenInside;
50+
if (responseBody.contains("commentSectionRenderer")) {
51+
commentsTokenInside = findValue(responseBody, "commentSectionRenderer", "}");
52+
} else{
53+
commentsTokenInside = findValue(responseBody, "sectionListRenderer", "}");
54+
}
5055
final String commentsToken = findValue(commentsTokenInside, "continuation\":\"", "\"");
5156
return getPage(getNextPage(commentsToken));
5257
}

0 commit comments

Comments
 (0)