mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-29 00:10:35 +05:30
Extract dashManifestUrl in playerResponse
This commit is contained in:
parent
60e6df7e6b
commit
7ef3e80493
@ -377,7 +377,9 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
|||||||
assertPageFetched();
|
assertPageFetched();
|
||||||
try {
|
try {
|
||||||
String dashManifestUrl;
|
String dashManifestUrl;
|
||||||
if (videoInfoPage.containsKey("dashmpd")) {
|
if (playerResponse.getObject("streamingData").isString("dashManifestUrl")) {
|
||||||
|
return playerResponse.getObject("streamingData").getString("dashManifestUrl");
|
||||||
|
} else if (videoInfoPage.containsKey("dashmpd")) {
|
||||||
dashManifestUrl = videoInfoPage.get("dashmpd");
|
dashManifestUrl = videoInfoPage.get("dashmpd");
|
||||||
} else if (playerArgs != null && playerArgs.isString("dashmpd")) {
|
} else if (playerArgs != null && playerArgs.isString("dashmpd")) {
|
||||||
dashManifestUrl = playerArgs.getString("dashmpd", EMPTY_STRING);
|
dashManifestUrl = playerArgs.getString("dashmpd", EMPTY_STRING);
|
||||||
|
@ -116,8 +116,7 @@ public class YoutubeStreamExtractorLivestreamTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetDashMpd() throws ParsingException {
|
public void testGetDashMpd() throws ParsingException {
|
||||||
// we dont expect this particular video to have a DASH file. For this purpouse we use a different test class.
|
assertTrue(extractor.getDashMpdUrl().startsWith("https://manifest.googlevideo.com/api/manifest/dash/"));
|
||||||
assertTrue(extractor.getDashMpdUrl(), extractor.getDashMpdUrl().isEmpty());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user