Merge pull request #572 from golfinq/fixed-comments
Fixes missing comments under videos
This commit is contained in:
commit
b608587e4d
1 changed files with 6 additions and 1 deletions
|
@ -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", "}");
|
final 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 a new issue