summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2014-09-03 21:03:36 +0700
committerSergey M․ <dstftw@gmail.com>2014-09-03 21:03:36 +0700
commitf164038b7944afb007a19b6cf1a793ee02399214 (patch)
treeed0a369e4b3c6a50161bcd174ffd2b382b6ffc72
parentf7a361c4f12f3bb0be3442316d53ce3a51ef7afc (diff)
downloadyoutube-dl-f164038b7944afb007a19b6cf1a793ee02399214.tar.gz
youtube-dl-f164038b7944afb007a19b6cf1a793ee02399214.tar.xz
youtube-dl-f164038b7944afb007a19b6cf1a793ee02399214.zip
[utils] Make parse_duration case insensitive
-rw-r--r--youtube_dl/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 91afe8622..3846dfdca 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1336,7 +1336,7 @@ def parse_duration(s):
     s = s.strip()
 
     m = re.match(
-        r'(?:(?:(?P<hours>[0-9]+)\s*(?:[:h]|hours?)\s*)?(?P<mins>[0-9]+)\s*(?:[:m]|mins?|minutes?)\s*)?(?P<secs>[0-9]+)(?P<ms>\.[0-9]+)?\s*(?:s|secs?|seconds?)?$', s)
+        r'(?i)(?:(?:(?P<hours>[0-9]+)\s*(?:[:h]|hours?)\s*)?(?P<mins>[0-9]+)\s*(?:[:m]|mins?|minutes?)\s*)?(?P<secs>[0-9]+)(?P<ms>\.[0-9]+)?\s*(?:s|secs?|seconds?)?$', s)
     if not m:
         return None
     res = int(m.group('secs'))