Skip to content

Commit 05a8d36

Browse files
committed
Mark live chat pages with live_chat identifier
1 parent 8a7cc39 commit 05a8d36

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ private Page getNextPage(final String continuation) throws ParsingException {
208208
public InfoItemsPage<CommentsInfoItem> getPage(final Page page)
209209
throws IOException, ExtractionException {
210210

211-
if (commentsDisabled && liveChatContinuation != null) {
211+
if ("live_chat".equals(page.getUrl())
212+
|| (commentsDisabled && liveChatContinuation != null)) {
212213
return fetchLiveChat(page.getId());
213214
}
214215

@@ -484,7 +485,7 @@ private InfoItemsPage<CommentsInfoItem> extractLiveChatComments(
484485
nextCont = contObj.getObject("liveChatReplayContinuationData")
485486
.getString("continuation");
486487
}
487-
nextPage = nextCont != null ? new Page(getUrl(), nextCont) : null;
488+
nextPage = nextCont != null ? new Page("live_chat", nextCont) : null;
488489
} else {
489490
nextPage = null;
490491
}

0 commit comments

Comments
 (0)