diff options
author | bashonly <88596187+bashonly@users.noreply.github.com> | 2023-05-30 10:43:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 15:43:01 +0000 |
commit | 1fe5bf240e6ade487d18079a62aa36bcc440a27a (patch) | |
tree | efc964a1f7ffb9e98f4bfa3c69b55e4183d347a6 | |
parent | 26c517b29c8727e47948d6fff749d5297f0efb60 (diff) | |
download | hypervideo-pre-1fe5bf240e6ade487d18079a62aa36bcc440a27a.tar.lz hypervideo-pre-1fe5bf240e6ade487d18079a62aa36bcc440a27a.tar.xz hypervideo-pre-1fe5bf240e6ade487d18079a62aa36bcc440a27a.zip |
[extractor/bravotv] Detect DRM (#7171)
Authored by: bashonly
-rw-r--r-- | yt_dlp/extractor/bravotv.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/yt_dlp/extractor/bravotv.py b/yt_dlp/extractor/bravotv.py index d4bf9b53b..13cc1927f 100644 --- a/yt_dlp/extractor/bravotv.py +++ b/yt_dlp/extractor/bravotv.py @@ -1,5 +1,6 @@ from .adobepass import AdobePassIE from ..utils import ( + HEADRequest, extract_attributes, float_or_none, get_element_html_by_class, @@ -153,8 +154,11 @@ class BravoTVIE(AdobePassIE): 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').geturl() + 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, |