diff --git a/extractors/video.py b/extractors/video.py index 68fc86a..e92b74f 100644 --- a/extractors/video.py +++ b/extractors/video.py @@ -105,6 +105,9 @@ def extract_video(id): "recommendedVideos": [] } + # result = info["formats"] + # return result + for format in info["formats"]: # Storyboard images are now included in formats, we don't want them. # Storyboards have neither audio nor video, so detect them that way. @@ -112,6 +115,10 @@ def extract_video(id): if format["acodec"] == "none" and format["vcodec"] == "none": 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. is_adaptive = format["acodec"] == "none" or format["vcodec"] == "none" sense = "video" if format["vcodec"] != "none" else "audio" @@ -125,7 +132,7 @@ def extract_video(id): if is_adaptive: url = "" - if format["protocol"] == "http_dash_segments": + if "fragment_base_url" in format: # this is http dash, which is annoying and doesn't work in