Updated to reflect variable name change

This commit is contained in:
golfinq 2021-03-05 02:40:36 -05:00 committed by GitHub
parent 9256b3b848
commit ae48bdea4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -46,7 +46,12 @@ public class YoutubeCommentsExtractor extends CommentsExtractor {
@Override
public InfoItemsPage<CommentsInfoItem> 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));
}