Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[extractor/bravotv] Detect DRM #7171

Merged
merged 1 commit into from
May 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions yt_dlp/extractor/bravotv.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .adobepass import AdobePassIE
from ..utils import (
HEADRequest,
extract_attributes,
float_or_none,
get_element_html_by_class,
Expand Down Expand Up @@ -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').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,
Expand Down