From ea4ac61edd1bd0ff34206521913aadf93395b5c5 Mon Sep 17 00:00:00 2001 From: CasperMcFadden95 <145611964+CasperMcFadden95@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:57:52 +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 926518948..f9a5ad9d7 100644 --- a/yt_dlp/extractor/dzsecurity.py +++ b/yt_dlp/extractor/dzsecurity.py @@ -47,15 +47,12 @@ def _real_extract(self, url): title = self._html_extract_title(webpage, default='Live Stream') - player_url_match = re.search( + player_url, stream_id = self._html_search_regex( r'https://live\.dzsecurity\.net/live/player/([a-zA-Z0-9_-]+)', webpage, + 'player URL', + group=(0, 1) ) - if not player_url_match: - raise ExtractorError('Player URL not found in the page') - - player_url = player_url_match.group(0) - stream_id = player_url_match.group(1) base_url_match = re.match(r'(https?://[^/]+)', url) if not base_url_match: