mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-28 09:28:33 +00:00
Update yt_dlp/extractor/dzsecurity.py
Co-authored-by: D Trombett <d@trombett.org>
This commit is contained in:
parent
ea4ac61edd
commit
0c6506c966
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user