aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/stv.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-04-06 03:37:17 +0800
committerJesús <heckyel@hyperbola.info>2022-04-06 03:37:17 +0800
commit1e5a50b71d8f0eae6007bedc329eecb24bb5aba3 (patch)
treea8611cda6596391cb6fb645e1469dcd356b63924 /hypervideo_dl/extractor/stv.py
parentf52fb3bceeb9d22b5106c1796fecec474a0cc138 (diff)
downloadhypervideo-1e5a50b71d8f0eae6007bedc329eecb24bb5aba3.tar.lz
hypervideo-1e5a50b71d8f0eae6007bedc329eecb24bb5aba3.tar.xz
hypervideo-1e5a50b71d8f0eae6007bedc329eecb24bb5aba3.zip
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/stv.py')
-rw-r--r--hypervideo_dl/extractor/stv.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/hypervideo_dl/extractor/stv.py b/hypervideo_dl/extractor/stv.py
index d36a4b6..ba5661d 100644
--- a/hypervideo_dl/extractor/stv.py
+++ b/hypervideo_dl/extractor/stv.py
@@ -45,10 +45,7 @@ class STVPlayerIE(InfoExtractor):
ptype, video_id = self._match_valid_url(url).groups()
webpage = self._download_webpage(url, video_id, fatal=False) or ''
- props = (self._parse_json(self._search_regex(
- r'<script[^>]+id="__NEXT_DATA__"[^>]*>({.+?})</script>',
- webpage, 'next data', default='{}'), video_id,
- fatal=False) or {}).get('props') or {}
+ props = self._search_nextjs_data(webpage, video_id, default='{}').get('props') or {}
player_api_cache = try_get(
props, lambda x: x['initialReduxState']['playerApiCache']) or {}