mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 14:20:33 +05:30
Merge pull request #477 from vkay94/fix-comments-parsing
Fix comments parsing
This commit is contained in:
commit
6fbcdd24ee
@ -160,8 +160,15 @@ public class YoutubeCommentsExtractor extends CommentsExtractor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String findValue(String doc, String start, String end) {
|
private String findValue(String doc, String start, String end) {
|
||||||
final int beginIndex = doc.indexOf(start) + start.length();
|
final String unescaped = doc
|
||||||
final int endIndex = doc.indexOf(end, beginIndex);
|
.replaceAll("\\\\x22", "\"")
|
||||||
return doc.substring(beginIndex, endIndex);
|
.replaceAll("\\\\x7b", "{")
|
||||||
|
.replaceAll("\\\\x7d", "}")
|
||||||
|
.replaceAll("\\\\x5b", "[")
|
||||||
|
.replaceAll("\\\\x5d", "]");
|
||||||
|
|
||||||
|
final int beginIndex = unescaped.indexOf(start) + start.length();
|
||||||
|
final int endIndex = unescaped.indexOf(end, beginIndex);
|
||||||
|
return unescaped.substring(beginIndex, endIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user