From 0c6506c9662ed1c984dcb6cf83b624c6f3d02b06 Mon Sep 17 00:00:00 2001 From: CasperMcFadden95 <145611964+CasperMcFadden95@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:58:23 +0000 Subject: [PATCH] Update yt_dlp/extractor/dzsecurity.py Co-authored-by: D Trombett --- yt_dlp/extractor/dzsecurity.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/yt_dlp/extractor/dzsecurity.py b/yt_dlp/extractor/dzsecurity.py index f9a5ad9d7..9b889dccb 100644 --- a/yt_dlp/extractor/dzsecurity.py +++ b/yt_dlp/extractor/dzsecurity.py @@ -66,14 +66,11 @@ def _real_extract(self, url): player_page = self._download_webpage(player_url, player_url, headers=headers) - m3u8_match = re.search( - r'src:\s*location\.protocol\s*\+\s*"(?P//[^"]+\.m3u8\?[^"]+)"', + m3u8_url = 'https:' + self._search_regex( + r'src:\s*location\.protocol\s*\+\s*"(//[^"]+\.m3u8\?[^"]+)"', player_page, + 'm3u8 URL', ) - if not m3u8_match: - raise ExtractorError('M3U8 stream URL not found in player page') - - m3u8_url = 'https:' + m3u8_match.group('url') return { 'id': stream_id,