1
0
mirror of https://git.sr.ht/~cadence/NewLeaf synced 2024-11-14 03:57:31 +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,
"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: