mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-06 06:45:00 +01:00
Merge de3cb27188 into 7ec6b9bc40
This commit is contained in:
commit
a98ff6c2ec
1 changed files with 3 additions and 1 deletions
|
|
@ -2437,9 +2437,11 @@ 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 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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue