]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/bravotv.py
[ie/crunchyroll] Fix stream extraction (#10005)
[yt-dlp.git] / yt_dlp / extractor / bravotv.py
index d4bf9b53b72e2f0015f34be5c470863bf7d15f5f..419fe8c9c8a3ac5a4ac689fae89c64386edc47a7 100644 (file)
@@ -1,4 +1,5 @@
 from .adobepass import AdobePassIE
+from ..networking import HEADRequest
 from ..utils import (
     extract_attributes,
     float_or_none,
@@ -153,8 +154,11 @@ def _real_extract(self, url):
         if len(chapters) == 1 and not traverse_obj(chapters, (0, 'end_time')):
             chapters = None
 
-        formats, subtitles = self._extract_m3u8_formats_and_subtitles(
-            update_url_query(f'{tp_url}/stream.m3u8', query), video_id, 'mp4', m3u8_id='hls')
+        m3u8_url = self._request_webpage(HEADRequest(
+            update_url_query(f'{tp_url}/stream.m3u8', query)), video_id, 'Checking m3u8 URL').url
+        if 'mpeg_cenc' in m3u8_url:
+            self.report_drm(video_id)
+        formats, subtitles = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, 'mp4', m3u8_id='hls')
 
         return {
             'id': video_id,