mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-28 16:00:33 +05:30
Fix video titles consisting of multiple parts due to @
This commit is contained in:
parent
951ed9f0d8
commit
8aa560bef4
@ -114,7 +114,12 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
|||||||
assertPageFetched();
|
assertPageFetched();
|
||||||
String title = null;
|
String title = null;
|
||||||
try {
|
try {
|
||||||
title = getVideoPrimaryInfoRenderer().getObject("title").getArray("runs").getObject(0).getString("text");
|
StringBuilder titleBuilder = new StringBuilder();
|
||||||
|
JsonArray titleArray = getVideoPrimaryInfoRenderer().getObject("title").getArray("runs");
|
||||||
|
for (Object titlePart : titleArray) {
|
||||||
|
titleBuilder.append(((JsonObject) titlePart).getString("text"));
|
||||||
|
}
|
||||||
|
title = titleBuilder.toString();
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
if (title == null) {
|
if (title == null) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user