2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-08-31 14:26:14 +00:00

Merge pull request #135 from yausername/ytlivestream-fix

[Youtube Live Streams] fixed extracting live HLS URL
This commit is contained in:
Christian Schabesberger
2019-01-20 13:55:32 +01:00
committed by GitHub

View File

@@ -386,11 +386,16 @@ public class YoutubeStreamExtractor extends StreamExtractor {
public String getHlsUrl() throws ParsingException {
assertPageFetched();
try {
String hlsvp;
if (playerArgs != null && playerArgs.isString("hlsvp")) {
hlsvp = playerArgs.getString("hlsvp", "");
} else {
return "";
String hlsvp = "";
if (playerArgs != null) {
if( playerArgs.isString("hlsvp") ) {
hlsvp = playerArgs.getString("hlsvp", "");
}else {
hlsvp = JsonParser.object()
.from(playerArgs.getString("player_response", "{}"))
.getObject("streamingData", new JsonObject())
.getString("hlsManifestUrl", "");
}
}
return hlsvp;