mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 01:32:59 +01:00
[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
@ -390,7 +390,8 @@ def _real_extract(self, url):
|
||||
show = match.group('show')
|
||||
show_info = self._download_json(self._API_BASE + show, season_id)
|
||||
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:
|
||||
raise ExtractorError(f'Couldn\'t find season {season} of {show}')
|
||||
|
Loading…
Reference in New Issue
Block a user