aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2020-12-05 15:35:29 +0100
committerRemita Amine <remitamine@gmail.com>2020-12-05 15:35:29 +0100
commit6bf95b15ee311d673e63ed5bc98d0b74040f24f0 (patch)
tree98e9d61fd80dfa280a631072b1982dcda608452b
parent4c93b2fd155cc15588017c14c033bcea1a1ff931 (diff)
[nrk] reduce the number of instalments requests
-rw-r--r--youtube_dl/extractor/nrk.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/nrk.py b/youtube_dl/extractor/nrk.py
index 289a0a3a4..24993b1c8 100644
--- a/youtube_dl/extractor/nrk.py
+++ b/youtube_dl/extractor/nrk.py
@@ -121,6 +121,7 @@ class NRKIE(NRKBaseIE):
def _extract_from_playback(self, video_id):
path_templ = 'playback/%s/' + video_id
+
def call_playback_api(item, query=None):
return self._call_api(path_templ % item, video_id, item, query=query)
# known values for preferredCdn: akamai, iponly, minicdn and telenor
@@ -696,7 +697,8 @@ class NRKTVSeriesIE(NRKTVSerieBaseIE):
domain = 'radio' if site == 'radio.nrk' else 'tv'
series = self._call_api(
- '%s/catalog/series/%s' % (domain, series_id), series_id, 'serie')
+ '%s/catalog/series/%s' % (domain, series_id),
+ series_id, 'serie', query={'embeddedInstalmentsPageSize': 50})
titles = try_get(series, [
lambda x: x['titles'],
lambda x: x[x['type']]['titles'],