diff --git a/ytmusicapi/helpers.py b/ytmusicapi/helpers.py index 47dd1ead..786a4e9f 100644 --- a/ytmusicapi/helpers.py +++ b/ytmusicapi/helpers.py @@ -67,8 +67,13 @@ def get_authorization(auth): def to_int(string): - number = string.split(' ')[0] - return locale.atoi(number) + number_string = string.split(' ')[0] + try: + int_value = locale.atoi(number_string) + except ValueError: + number_string = number_string.replace(',', '') + int_value = int(number_string) + return int_value def i18n(method):