aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/paramountplus.py
diff options
context:
space:
mode:
authorDorian Westacott <dodrian@dodrian.com>2022-03-16 18:54:20 -0500
committerGitHub <noreply@github.com>2022-03-16 16:54:20 -0700
commitec47c12f69857f09a79787a7346c957f5b3d4e16 (patch)
tree04301113980a26cb667930378ca3fae99b31ef19 /yt_dlp/extractor/paramountplus.py
parent25791435b74fa32663644a4327ccd3ffa7e734ed (diff)
downloadhypervideo-pre-ec47c12f69857f09a79787a7346c957f5b3d4e16.tar.lz
hypervideo-pre-ec47c12f69857f09a79787a7346c957f5b3d4e16.tar.xz
hypervideo-pre-ec47c12f69857f09a79787a7346c957f5b3d4e16.zip
[ParamountPlusSeries] Support multiple pages (#3026)
Authored by: dodrian
Diffstat (limited to 'yt_dlp/extractor/paramountplus.py')
-rw-r--r--yt_dlp/extractor/paramountplus.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/yt_dlp/extractor/paramountplus.py b/yt_dlp/extractor/paramountplus.py
index 17138985a..a1d7cd724 100644
--- a/yt_dlp/extractor/paramountplus.py
+++ b/yt_dlp/extractor/paramountplus.py
@@ -1,4 +1,5 @@
from __future__ import unicode_literals
+import itertools
from .common import InfoExtractor
from .cbs import CBSBaseIE
@@ -128,11 +129,13 @@ class ParamountPlusSeriesIE(InfoExtractor):
'id': 'spongebob-squarepants',
}
}]
- _API_URL = 'https://www.paramountplus.com/shows/{}/xhr/episodes/page/0/size/100000/xs/0/season/0/'
def _entries(self, show_name):
- show_json = self._download_json(self._API_URL.format(show_name), video_id=show_name)
- if show_json.get('success'):
+ for page in itertools.count():
+ show_json = self._download_json(
+ f'https://www.paramountplus.com/shows/{show_name}/xhr/episodes/page/{page}/size/50/xs/0/season/0', show_name)
+ if not show_json.get('success'):
+ return
for episode in show_json['result']['data']:
yield self.url_result(
'https://www.paramountplus.com%s' % episode['url'],