Updated to reflect variable name change
This commit is contained in:
parent
9256b3b848
commit
ae48bdea4c
|
@ -46,7 +46,12 @@ public class YoutubeCommentsExtractor extends CommentsExtractor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InfoItemsPage<CommentsInfoItem> getInitialPage() throws IOException, ExtractionException {
|
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\":\"", "\"");
|
final String commentsToken = findValue(commentsTokenInside, "continuation\":\"", "\"");
|
||||||
return getPage(getNextPage(commentsToken));
|
return getPage(getNextPage(commentsToken));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue