From b83d7526f2093f6c2392b02985fa27e00fac53cb Mon Sep 17 00:00:00 2001 From: Elyse <26639800+elyse0@users.noreply.github.com> Date: Thu, 9 Mar 2023 17:21:02 -0600 Subject: [PATCH] Add fixme in modified parse_chapters function A range like '*(now-1hour)-(now-30minutes)' doesn't work --- yt_dlp/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 3145a6f1b6..4ebdff2982 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -337,6 +337,7 @@ def parse_timestamp(x): for regex in value or []: if regex.startswith('*'): for range_ in map(str.strip, regex[1:].split(',')): + # FIXME: This is really sensible mobj = range_ != '-' and re.fullmatch(r'(.+)?\s*-\s*(.+)?', range_) dur = mobj and (parse_timestamp(mobj.group(1) or '0'), parse_timestamp(mobj.group(2) or 'inf')) if None in (dur or [None]):