mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-09 17:24:10 +01:00
Allow days in parse_duration
This commit is contained in:
parent
6cea8cbe2d
commit
544836de83
1 changed files with 2 additions and 2 deletions
|
@ -2704,9 +2704,9 @@ def parse_duration(s):
|
||||||
if m:
|
if m:
|
||||||
sign, days, hours, mins, secs, ms = m.groups()
|
sign, days, hours, mins, secs, ms = m.groups()
|
||||||
else:
|
else:
|
||||||
m = re.match(r'(?i)(?P<sign>[+-])?(?:(?P<hours>[0-9.]+)\s*(?:hours?)|(?P<mins>[0-9.]+)\s*(?:mins?\.?|minutes?)\s*)Z?$', s)
|
m = re.match(r'(?i)(?P<sign>[+-])?(?:(?P<days>[0-9.]+)\s*(?:days?)|(?P<hours>[0-9.]+)\s*(?:hours?)|(?P<mins>[0-9.]+)\s*(?:mins?\.?|minutes?)\s*)Z?$', s)
|
||||||
if m:
|
if m:
|
||||||
sign, hours, mins = m.groups()
|
sign, days, hours, mins = m.groups()
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue