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] 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')