mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-28 07:50:34 +05:30
Fix comment reply continuations.
This commit is contained in:
parent
666b45958e
commit
e8e9e6cd00
@ -112,12 +112,6 @@ public class CommentsInfoItemsCollector extends InfoItemsCollector<CommentsInfoI
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<CommentsInfoItem> getCommentsInfoItemList() {
|
public List<CommentsInfoItem> getCommentsInfoItemList() {
|
||||||
List<CommentsInfoItem> siiList = new ArrayList<>();
|
return new ArrayList<>(super.getItems());
|
||||||
for (InfoItem ii : super.getItems()) {
|
|
||||||
if (ii instanceof CommentsInfoItem) {
|
|
||||||
siiList.add((CommentsInfoItem) ii);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return siiList;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,10 +140,13 @@ public class YoutubeCommentsExtractor extends CommentsExtractor {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final JsonObject continuationItemRenderer = jsonArray.getObject(jsonArray.size() - 1).getObject("continuationItemRenderer");
|
||||||
|
|
||||||
|
final String jsonPath = continuationItemRenderer.has("button") ? "button.buttonRenderer.command.continuationCommand.token" : "continuationEndpoint.continuationCommand.token";
|
||||||
|
|
||||||
final String continuation;
|
final String continuation;
|
||||||
try {
|
try {
|
||||||
continuation = JsonUtils.getString(jsonArray.getObject(jsonArray.size() - 1),
|
continuation = JsonUtils.getString(continuationItemRenderer, jsonPath);
|
||||||
"continuationItemRenderer.continuationEndpoint.continuationCommand.token");
|
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user