From 25d538930f1e33e9793ad076d0cbd4c38c7f29fa Mon Sep 17 00:00:00 2001 From: sigma67 Date: Mon, 1 Feb 2021 14:21:39 +0100 Subject: [PATCH] Update duration regex to work for long videos (#164) --- ytmusicapi/parsers/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ytmusicapi/parsers/utils.py b/ytmusicapi/parsers/utils.py index 27a8acb..05c1773 100644 --- a/ytmusicapi/parsers/utils.py +++ b/ytmusicapi/parsers/utils.py @@ -36,7 +36,7 @@ def parse_song_runs(runs): if text.endswith(' views'): parsed['views'] = text.split(' ')[0] - elif re.match(r"^\d+:\d+$", text): + elif re.match(r"^(\d+:)*\d+:\d+$", text): parsed['duration'] = text elif re.match(r"^\d{4}$", text):