diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index ef6e7c7cb..bad1c4ea8 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1346,7 +1346,7 @@ def format_bytes(bytes): def lookup_unit_table(unit_table, s): units_re = '|'.join(re.escape(u) for u in unit_table) m = re.match( - r'(?P[0-9]+(?:[,.][0-9]*)?)\s*(?P%s)' % units_re, s) + r'(?P[0-9]+(?:[,.][0-9]*)?)\s*(?P%s)$' % units_re, s) if not m: return None num_str = m.group('num').replace(',', '.')