mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-02 08:28:21 +01:00
Fix bug after merge
This commit is contained in:
parent
99e6074c5d
commit
622c555356
|
@ -335,7 +335,7 @@ def parse_chapters(name, value, advanced=False):
|
|||
if advanced and regex == '*from-url':
|
||||
from_url = True
|
||||
continue
|
||||
elif not regex.startswith('*') or not regex.startswith('#'):
|
||||
elif not regex.startswith('*') and not regex.startswith('#'):
|
||||
try:
|
||||
chapters.append(re.compile(regex))
|
||||
except re.error as err:
|
||||
|
@ -344,8 +344,7 @@ def parse_chapters(name, value, advanced=False):
|
|||
|
||||
for range_ in map(str.strip, regex[1:].split(',')):
|
||||
mobj = range_ != '-' and re.fullmatch(TIMESTAMP_RE, range_)
|
||||
dur = mobj and [parse_timestamp(mobj.group('start') or '0'),
|
||||
parse_timestamp(mobj.group('end') or 'inf')]
|
||||
dur = mobj and [parse_timestamp(mobj.group('start') or '0'), parse_timestamp(mobj.group('end') or 'inf')]
|
||||
signs = mobj and (mobj.group('start_sign'), mobj.group('end_sign'))
|
||||
|
||||
err = None
|
||||
|
|
Loading…
Reference in New Issue
Block a user