From 7002474336f22e0f494acdecf00da0033246f75c Mon Sep 17 00:00:00 2001 From: Cactus <88598340+pha1n0q@users.noreply.github.com> Date: Fri, 15 Aug 2025 19:21:33 -0400 Subject: [PATCH 1/3] fix very minor typo --- yt_dlp/utils/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index a5471da4df..cb920a0d8a 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -2436,7 +2436,7 @@ class PlaylistEntries: def parse_playlist_items(cls, string): for segment in string.split(','): if not segment: - raise ValueError('There is two or more consecutive commas') + raise ValueError('There are two or more consecutive commas') mobj = cls.PLAYLIST_ITEMS_RE.fullmatch(segment) if not mobj: raise ValueError(f'{segment!r} is not a valid specification') From 60eb1314bc69ba9b2a62514067b5f9b904418a1c Mon Sep 17 00:00:00 2001 From: pha1n0q <88598340+pha1n0q@users.noreply.github.com> Date: Fri, 15 Aug 2025 23:56:36 -0400 Subject: [PATCH 2/3] Update yt_dlp/utils/_utils.py Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com> --- yt_dlp/utils/_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index cb920a0d8a..e5db7f01ad 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -2434,6 +2434,8 @@ class PlaylistEntries: @classmethod def parse_playlist_items(cls, string): + if string.startswith(',') or string.endswith(','): + raise ValueError('There is an invalid leading comma or a trailing comma') for segment in string.split(','): if not segment: raise ValueError('There are two or more consecutive commas') From de3cb27188cd7d155b40308459a7d802fc8326d0 Mon Sep 17 00:00:00 2001 From: Cactus <88598340+pha1n0q@users.noreply.github.com> Date: Fri, 15 Aug 2025 23:59:43 -0400 Subject: [PATCH 3/3] Update _utils.py --- yt_dlp/utils/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index e5db7f01ad..fb6d173be1 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -2435,7 +2435,7 @@ class PlaylistEntries: @classmethod def parse_playlist_items(cls, string): if string.startswith(',') or string.endswith(','): - raise ValueError('There is an invalid leading comma or a trailing comma') + raise ValueError('There is an invalid leading comma or a trailing comma') for segment in string.split(','): if not segment: raise ValueError('There are two or more consecutive commas')