[nrk] reduce the number of instalments requests
authorRemita Amine <remitamine@gmail.com>
Sat, 5 Dec 2020 14:35:29 +0000 (15:35 +0100)
committerRemita Amine <remitamine@gmail.com>
Sat, 5 Dec 2020 14:35:29 +0000 (15:35 +0100)
youtube_dl/extractor/nrk.py

index 289a0a3a45a187b0e11c6d55cd1f3924e882bfff..24993b1c805b1e9911393b6c3bed2e4b6da509fc 100644 (file)
@@ -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'],