Merge pull request #333 from wb9688/playerresponse-dashmanifesturl
Extract dashManifestUrl in playerResponse
This commit is contained in:
commit
0b4977bb0c
|
@ -377,7 +377,9 @@ public class YoutubeStreamExtractor extends StreamExtractor {
|
|||
assertPageFetched();
|
||||
try {
|
||||
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");
|
||||
} else if (playerArgs != null && playerArgs.isString("dashmpd")) {
|
||||
dashManifestUrl = playerArgs.getString("dashmpd", EMPTY_STRING);
|
||||
|
|
|
@ -116,8 +116,7 @@ public class YoutubeStreamExtractorLivestreamTest {
|
|||
|
||||
@Test
|
||||
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(), extractor.getDashMpdUrl().isEmpty());
|
||||
assertTrue(extractor.getDashMpdUrl().startsWith("https://manifest.googlevideo.com/api/manifest/dash/"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue