From c832142b1d759c6d5d9303fd4bd05942da3a86ef Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Thu, 27 Aug 2020 17:22:18 +1200 Subject: [PATCH] Experimental fragment_base_url --- extractors/video.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extractors/video.py b/extractors/video.py index 554627a..f34793b 100644 --- a/extractors/video.py +++ b/extractors/video.py @@ -121,7 +121,7 @@ def extract_video(id): "index": None, "bitrate": str(int(format["tbr"]*1000)), "init": None, - "url": format["url"], + "url": format["fragment_base_url"] if format["protocol"] == "http_dash_segments" else format["url"], "itag": format["format_id"], "type": format_type(format), "second__mime": format_mime(format), @@ -238,8 +238,10 @@ def get_more_stuff_from_file(id, result): if "dashManifestUrl" in player_response["streamingData"]: result["second__providedDashUrl"] = player_response["streamingData"]["dashManifestUrl"] result["liveNow"] = player_response["videoDetails"]["isLiveContent"] + # result = player_response # return result + itagDict = {} for f in player_response["streamingData"]["adaptiveFormats"]: if "indexRange" in f: