Compare commits

..

No commits in common. "82f28cb99d4cea774a9975a5b61bc301ab9b9f20" and "412b4934ed7c3b68bfecaab1c04dde102e407f9b" have entirely different histories.

1 changed files with 1 additions and 8 deletions

View File

@ -105,9 +105,6 @@ def extract_video(id):
"recommendedVideos": [] "recommendedVideos": []
} }
# result = info["formats"]
# return result
for format in info["formats"]: for format in info["formats"]:
# Storyboard images are now included in formats, we don't want them. # Storyboard images are now included in formats, we don't want them.
# Storyboards have neither audio nor video, so detect them that way. # Storyboards have neither audio nor video, so detect them that way.
@ -115,10 +112,6 @@ def extract_video(id):
if format["acodec"] == "none" and format["vcodec"] == "none": if format["acodec"] == "none" and format["vcodec"] == "none":
continue continue
# m3u8 playlists cannot be played.
if "m3u8" in format["protocol"]:
continue
# Adaptive formats have either audio or video, format streams have both, storyboard images have neither. # Adaptive formats have either audio or video, format streams have both, storyboard images have neither.
is_adaptive = format["acodec"] == "none" or format["vcodec"] == "none" is_adaptive = format["acodec"] == "none" or format["vcodec"] == "none"
sense = "video" if format["vcodec"] != "none" else "audio" sense = "video" if format["vcodec"] != "none" else "audio"
@ -132,7 +125,7 @@ def extract_video(id):
if is_adaptive: if is_adaptive:
url = "" url = ""
if "fragment_base_url" in format: if format["protocol"] == "http_dash_segments":
# this is http dash, which is annoying and doesn't work in <video>. # this is http dash, which is annoying and doesn't work in <video>.
# we have a fragment_base_url, which seems to be playable for all audio, but only with certain video itags??? very confused # we have a fragment_base_url, which seems to be playable for all audio, but only with certain video itags??? very confused
if format["acodec"] == "none" and format["format_id"] not in ["134", "136"]: if format["acodec"] == "none" and format["format_id"] not in ["134", "136"]: