fix: channel short upload date parsing

This commit is contained in:
ThetaDev 2022-11-03 09:19:20 +01:00
parent 856584f820
commit 7ec6a44926
1 changed files with 13 additions and 1 deletions

View File

@ -241,10 +241,22 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
final String publishedTimeText
= getTextFromObject(videoInfo.getObject("publishedTimeText"));
if (publishedTimeText != null && !publishedTimeText.isEmpty()) {
if (!isNullOrEmpty(publishedTimeText)) {
return publishedTimeText;
}
final String shortsTimestampText = getTextFromObject(videoInfo
.getObject("navigationEndpoint")
.getObject("reelWatchEndpoint").getObject("overlay")
.getObject("reelPlayerOverlayRenderer")
.getObject("reelPlayerHeaderSupportedRenderers")
.getObject("reelPlayerHeaderRenderer")
.getObject("timestampText")
);
if (!isNullOrEmpty(shortsTimestampText)) {
return shortsTimestampText;
}
return null;
}