[CBC Gem] Fix for shows that don't have all seasons (#1621)
Closes #1594 Authored by: makeworld-the-better-one
This commit is contained in:
parent
b47d236d72
commit
013ae2e503
1 changed files with 2 additions and 1 deletions
|
@ -390,7 +390,8 @@ class CBCGemPlaylistIE(InfoExtractor):
|
||||||
show = match.group('show')
|
show = match.group('show')
|
||||||
show_info = self._download_json(self._API_BASE + show, season_id)
|
show_info = self._download_json(self._API_BASE + show, season_id)
|
||||||
season = int(match.group('season'))
|
season = int(match.group('season'))
|
||||||
season_info = try_get(show_info, lambda x: x['seasons'][season - 1])
|
|
||||||
|
season_info = next((s for s in show_info['seasons'] if s.get('season') == season), None)
|
||||||
|
|
||||||
if season_info is None:
|
if season_info is None:
|
||||||
raise ExtractorError(f'Couldn\'t find season {season} of {show}')
|
raise ExtractorError(f'Couldn\'t find season {season} of {show}')
|
||||||
|
|
Loading…
Reference in a new issue