mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-27 23:40:36 +05:30
fix comment url
This commit is contained in:
parent
536365c99e
commit
a2735c4f97
@ -107,11 +107,11 @@ public class YoutubeCommentsExtractor extends CommentsExtractor {
|
|||||||
throw new ParsingException("Could not parse json data for comments", e);
|
throw new ParsingException("Could not parse json data for comments", e);
|
||||||
}
|
}
|
||||||
CommentsInfoItemsCollector collector = new CommentsInfoItemsCollector(getServiceId());
|
CommentsInfoItemsCollector collector = new CommentsInfoItemsCollector(getServiceId());
|
||||||
collectCommentsFrom(collector, ajaxJson, pageUrl);
|
collectCommentsFrom(collector, ajaxJson);
|
||||||
return new InfoItemsPage<>(collector, getNextPageUrl(ajaxJson));
|
return new InfoItemsPage<>(collector, getNextPageUrl(ajaxJson));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void collectCommentsFrom(CommentsInfoItemsCollector collector, JsonObject ajaxJson, String pageUrl) throws ParsingException {
|
private void collectCommentsFrom(CommentsInfoItemsCollector collector, JsonObject ajaxJson) throws ParsingException {
|
||||||
|
|
||||||
JsonArray contents;
|
JsonArray contents;
|
||||||
try {
|
try {
|
||||||
@ -130,7 +130,7 @@ public class YoutubeCommentsExtractor extends CommentsExtractor {
|
|||||||
|
|
||||||
for(Object c: comments) {
|
for(Object c: comments) {
|
||||||
if(c instanceof JsonObject) {
|
if(c instanceof JsonObject) {
|
||||||
CommentsInfoItemExtractor extractor = new YoutubeCommentsInfoItemExtractor((JsonObject) c, pageUrl);
|
CommentsInfoItemExtractor extractor = new YoutubeCommentsInfoItemExtractor((JsonObject) c, getUrl());
|
||||||
collector.commit(extractor);
|
collector.commit(extractor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user