aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/skyit.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-01-20 03:25:15 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-01-20 04:38:24 +0530
commit135dfa2c7ebc9284db940713c0dc6cbc19ca5fa4 (patch)
treea555a6c1d7d2d053c2c31b19c55eb8c2ef602a04 /yt_dlp/extractor/skyit.py
parente0585e6562bc467a17c9fef7b48b83c6f0f83652 (diff)
downloadhypervideo-pre-135dfa2c7ebc9284db940713c0dc6cbc19ca5fa4.tar.lz
hypervideo-pre-135dfa2c7ebc9284db940713c0dc6cbc19ca5fa4.tar.xz
hypervideo-pre-135dfa2c7ebc9284db940713c0dc6cbc19ca5fa4.zip
[extractor,cleanup] Use `_search_nextjs_data`
Diffstat (limited to 'yt_dlp/extractor/skyit.py')
-rw-r--r--yt_dlp/extractor/skyit.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/yt_dlp/extractor/skyit.py b/yt_dlp/extractor/skyit.py
index 496bb42a2..ddb43c075 100644
--- a/yt_dlp/extractor/skyit.py
+++ b/yt_dlp/extractor/skyit.py
@@ -3,7 +3,6 @@ from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
- compat_str,
compat_parse_qs,
compat_urllib_parse_urlparse,
)
@@ -125,9 +124,7 @@ class SkyItVideoLiveIE(SkyItPlayerIE):
def _real_extract(self, url):
display_id = self._match_id(url)
webpage = self._download_webpage(url, display_id)
- asset_id = compat_str(self._parse_json(self._search_regex(
- r'<script[^>]+id="__NEXT_DATA__"[^>]*>({.+?})</script>',
- webpage, 'next data'), display_id)['props']['initialState']['livePage']['content']['asset_id'])
+ asset_id = str(self._search_nextjs_data(webpage, display_id)['props']['initialState']['livePage']['content']['asset_id'])
livestream = self._download_json(
'https://apid.sky.it/vdp/v1/getLivestream',
asset_id, query={'id': asset_id})