From 82f28cb99d4cea774a9975a5b61bc301ab9b9f20 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Mon, 13 Mar 2023 01:00:19 +1300 Subject: [PATCH] Exclude m3u8 playlist formats --- extractors/video.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extractors/video.py b/extractors/video.py index 58d68e6..e92b74f 100644 --- a/extractors/video.py +++ b/extractors/video.py @@ -115,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"