Update yt_dlp/utils/_utils.py

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
pull/14033/head
pha1n0q 2 days ago committed by GitHub
parent 7002474336
commit 60eb1314bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2434,6 +2434,8 @@ class PlaylistEntries:
@classmethod @classmethod
def parse_playlist_items(cls, string): 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(','): for segment in string.split(','):
if not segment: if not segment:
raise ValueError('There are two or more consecutive commas') raise ValueError('There are two or more consecutive commas')

Loading…
Cancel
Save