From 7e8e6cb621014ba991e96faafe6fd5623fd775f6 Mon Sep 17 00:00:00 2001 From: MrDemocracy Date: Sun, 6 Oct 2024 01:44:41 +0200 Subject: [PATCH] [nrk] Modify api_url construction logic for season extractor --- yt_dlp/extractor/nrk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/extractor/nrk.py b/yt_dlp/extractor/nrk.py index 1c3c2f21d..aece411a7 100644 --- a/yt_dlp/extractor/nrk.py +++ b/yt_dlp/extractor/nrk.py @@ -720,7 +720,7 @@ class NRKTVSeasonIE(NRKTVSerieBaseIE): domain, serie_kind, serie = mobj.group('domain'), mobj.group('serie_kind'), mobj.group('serie') season_id = 'extramaterial' if 'ekstramateriale' in (mobj.group('id'), mobj.group('id_2')) else mobj.group('id') or mobj.group('id_2') - api_url = f'{domain}/catalog/{self._catalog_name(serie_kind)}/{serie}{'/seasons/' + season_id if season_id != 'extramaterial' else '/extramaterial'}' + api_url = f'{domain}/catalog/{self._catalog_name(serie_kind)}/{serie}{"/seasons/" if not season_id == "extramaterial" else "/extramaterial"}{season_id if not season_id == "extramaterial" else ""}' data = self._call_api(api_url, f'{serie}/{season_id}', 'season', query={'pageSize': 50}) title = try_get(data, lambda x: x['titles']['title'], str) or f'{serie}/{season_id}'