From 7e96492ba0dd902261c3e308a6c6d8d129c80af8 Mon Sep 17 00:00:00 2001 From: DmitryScaletta Date: Thu, 15 Feb 2024 12:39:46 +0300 Subject: [PATCH] [PromoDJ] Fix page size for playlists --- yt_dlp/extractor/promodj.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/promodj.py b/yt_dlp/extractor/promodj.py index 4f29a4347..cdf33741f 100644 --- a/yt_dlp/extractor/promodj.py +++ b/yt_dlp/extractor/promodj.py @@ -521,10 +521,10 @@ class PromoDJPlaylistIE(PromoDJBaseIE): _ALLOWED_MEDIA_CATS = ['music', 'video'] - def _get_page_size(self, url): - if '/uenno' in url: + def _get_page_size(self, type): + if type == 'uenno': return 15 - if '/groups/' in url: + if type == 'groups': return 30 return 20 @@ -536,7 +536,7 @@ class PromoDJPlaylistIE(PromoDJBaseIE): entries = OnDemandPagedList( functools.partial(self._fetch_page, url, self._ALLOWED_MEDIA_CATS, playlist_id), - self._get_page_size(url)) + self._get_page_size(type)) return self.playlist_result(entries, playlist_id=playlist_id)