aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/stv.py
diff options
context:
space:
mode:
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 {}