Skip to content

Commit b782992

Browse files
committed
Update YoutubeCommentsExtractor for live chat pages
1 parent 08f6570 commit b782992

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ 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) {
212+
return fetchLiveChat(page.getId());
213+
}
214+
211215
if (commentsDisabled) {
212216
return getInfoItemsPageForDisabledComments();
213217
}
@@ -497,6 +501,11 @@ public boolean isCommentsDisabled() {
497501
return commentsDisabled && liveChatContinuation == null;
498502
}
499503

504+
@Override
505+
public boolean isLiveChat() {
506+
return liveChatContinuation != null;
507+
}
508+
500509
@Override
501510
public int getCommentsCount() throws ExtractionException {
502511
assertPageFetched();

0 commit comments

Comments
 (0)