1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 14:45:14 +00:00

[ie] Make _search_nextjs_data non fatal (#8937)

Authored by: Grub4K
This commit is contained in:
Simon Sawicki
2024-04-21 13:40:38 +02:00
committed by GitHub
parent e3b42d8b1b
commit 3ee1194288
5 changed files with 22 additions and 9 deletions

View File

@@ -41,7 +41,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._search_nextjs_data(webpage, video_id, default='{}').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 {}