From 544836de83485dcae255ca3b375745937d34f5ec Mon Sep 17 00:00:00 2001 From: Elyse <26639800+elyse0@users.noreply.github.com> Date: Sun, 12 Mar 2023 01:37:21 -0600 Subject: [PATCH] Allow days in parse_duration --- yt_dlp/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index bc2c362994..3769e2c914 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -2704,9 +2704,9 @@ def parse_duration(s): if m: sign, days, hours, mins, secs, ms = m.groups() else: - m = re.match(r'(?i)(?P[+-])?(?:(?P[0-9.]+)\s*(?:hours?)|(?P[0-9.]+)\s*(?:mins?\.?|minutes?)\s*)Z?$', s) + m = re.match(r'(?i)(?P[+-])?(?:(?P[0-9.]+)\s*(?:days?)|(?P[0-9.]+)\s*(?:hours?)|(?P[0-9.]+)\s*(?:mins?\.?|minutes?)\s*)Z?$', s) if m: - sign, hours, mins = m.groups() + sign, days, hours, mins = m.groups() else: return None