1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-21 20:15:36 +08:00

Strip spaces used as numeric separators by some locales (e.g. fr, uk).

This commit is contained in:
Tristan Waddington 2019-08-17 23:02:14 -07:00
parent d332ec725d
commit 66bfdcea6d
No known key found for this signature in database
GPG Key ID: 19AEB0C1E96BC8EB

View File

@ -3532,7 +3532,7 @@ def str_to_int(int_str):
if isinstance(int_str, compat_integer_types):
return int_str
elif isinstance(int_str, compat_str):
int_str = re.sub(r'[,\.\+]', '', int_str)
int_str = re.sub(r'[,\.\s\+]', '', int_str)
return int_or_none(int_str)