1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-27 17:08:32 +00:00

[ie/tbsjp] make window.app function non-fatal for EpisodeIE

Co-authored-by: doe1080 <98906116+doe1080@users.noreply.github.com>
This commit is contained in:
garret1317 2025-06-17 16:09:28 +01:00 committed by GitHub
parent 8e8cf2bc67
commit 5c6a350222
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,7 @@
class TBSJPBaseIE(StreaksBaseIE):
def _window_app(self, webpage, name, item_id, fatal=True):
return self._search_json(r'window\.app\s*=', webpage, f'{name} info', item_id, fatal=fatal)
return self._search_json(r'window\.app\s*=', webpage, f'{name} info', item_id, fatal=fatal, default={})
class TBSJPEpisodeIE(TBSJPBaseIE):
@ -50,7 +50,7 @@ class TBSJPEpisodeIE(TBSJPBaseIE):
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
meta = self._window_app(webpage, 'episode', video_id)
meta = self._window_app(webpage, 'episode', video_id, fatal=False)
episode = traverse_obj(meta, ('falcorCache', 'catalog', 'episode', video_id, 'value'))
return {