1
0
mirror of https://git.sr.ht/~cadence/NewLeaf synced 2024-11-25 00:47:29 +00:00

Experimental fragment_base_url

This commit is contained in:
Cadence Ember 2020-08-27 17:22:18 +12:00
parent ddf52e6346
commit c832142b1d

View File

@ -121,7 +121,7 @@ def extract_video(id):
"index": None, "index": None,
"bitrate": str(int(format["tbr"]*1000)), "bitrate": str(int(format["tbr"]*1000)),
"init": None, "init": None,
"url": format["url"], "url": format["fragment_base_url"] if format["protocol"] == "http_dash_segments" else format["url"],
"itag": format["format_id"], "itag": format["format_id"],
"type": format_type(format), "type": format_type(format),
"second__mime": format_mime(format), "second__mime": format_mime(format),
@ -238,8 +238,10 @@ def get_more_stuff_from_file(id, result):
if "dashManifestUrl" in player_response["streamingData"]: if "dashManifestUrl" in player_response["streamingData"]:
result["second__providedDashUrl"] = player_response["streamingData"]["dashManifestUrl"] result["second__providedDashUrl"] = player_response["streamingData"]["dashManifestUrl"]
result["liveNow"] = player_response["videoDetails"]["isLiveContent"] result["liveNow"] = player_response["videoDetails"]["isLiveContent"]
# result = player_response # result = player_response
# return result # return result
itagDict = {} itagDict = {}
for f in player_response["streamingData"]["adaptiveFormats"]: for f in player_response["streamingData"]["adaptiveFormats"]:
if "indexRange" in f: if "indexRange" in f: