diff options
author | coletdev <coletdjnz@protonmail.com> | 2022-03-28 13:49:42 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-28 00:49:42 +0000 |
commit | 1c1b2f96ae9696ef16b1b27d1a007bf89c683a0c (patch) | |
tree | d6aa656d3213ccacb278fa1d6b50c05c43f70a6a /yt_dlp/utils.py | |
parent | 47b8bf207b1206466f1aeaaf0c8ffec91be2fed0 (diff) |
[youtube:tab] Fix duration extraction for shorts (#3171)
Related: https://github.com/TeamNewPipe/NewPipe/issues/8034
Authored-by: coletdjnz
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 6854dbb63..72f11691f 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -2644,23 +2644,23 @@ def parse_duration(s): m = re.match( r'''(?ix)(?:P? (?: - [0-9]+\s*y(?:ears?)?\s* + [0-9]+\s*y(?:ears?)?,?\s* )? (?: - [0-9]+\s*m(?:onths?)?\s* + [0-9]+\s*m(?:onths?)?,?\s* )? (?: - [0-9]+\s*w(?:eeks?)?\s* + [0-9]+\s*w(?:eeks?)?,?\s* )? (?: - (?P<days>[0-9]+)\s*d(?:ays?)?\s* + (?P<days>[0-9]+)\s*d(?:ays?)?,?\s* )? T)? (?: - (?P<hours>[0-9]+)\s*h(?:ours?)?\s* + (?P<hours>[0-9]+)\s*h(?:ours?)?,?\s* )? (?: - (?P<mins>[0-9]+)\s*m(?:in(?:ute)?s?)?\s* + (?P<mins>[0-9]+)\s*m(?:in(?:ute)?s?)?,?\s* )? (?: (?P<secs>[0-9]+)(?P<ms>\.[0-9]+)?\s*s(?:ec(?:ond)?s?)?\s* |