Unverified Commit b608587e authored by Tobi's avatar Tobi Committed by GitHub
Browse files

Merge pull request #572 from golfinq/fixed-comments

Fixes missing comments under videos
parents 9256b3b8 05213175
......@@ -46,7 +46,12 @@ public class YoutubeCommentsExtractor extends CommentsExtractor {
@Override
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\":\"", "\"");
return getPage(getNextPage(commentsToken));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment