1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-28 01:18:30 +00:00

Update yt_dlp/extractor/dzsecurity.py

Co-authored-by: D Trombett <d@trombett.org>
This commit is contained in:
CasperMcFadden95 2025-06-18 18:58:23 +00:00 committed by GitHub
parent ea4ac61edd
commit 0c6506c966
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,14 +66,11 @@ def _real_extract(self, url):
player_page = self._download_webpage(player_url, player_url, headers=headers) player_page = self._download_webpage(player_url, player_url, headers=headers)
m3u8_match = re.search( m3u8_url = 'https:' + self._search_regex(
r'src:\s*location\.protocol\s*\+\s*"(?P<url>//[^"]+\.m3u8\?[^"]+)"', r'src:\s*location\.protocol\s*\+\s*"(//[^"]+\.m3u8\?[^"]+)"',
player_page, 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 { return {
'id': stream_id, 'id': stream_id,