From 00fbc942e5377a31c01914fe472b8060f2e610c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 23 Feb 2022 00:02:10 +0100 Subject: [PATCH] add 'timedelta' class to the global namespace in filter expressions (https://github.com/mikf/gallery-dl/issues/2308#issuecomment-1046135924) --- gallery_dl/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gallery_dl/util.py b/gallery_dl/util.py index 4c5e8948..0cea2cb0 100644 --- a/gallery_dl/util.py +++ b/gallery_dl/util.py @@ -424,6 +424,7 @@ GLOBALS = { "parse_int": text.parse_int, "urlsplit" : urllib.parse.urlsplit, "datetime" : datetime.datetime, + "timedelta": datetime.timedelta, "abort" : raises(exception.StopExtraction), "terminate": raises(exception.TerminateExtraction), "re" : re,