diff --git a/plugin/avtodor-tr.py b/plugin/avtodor-tr.py index 1a9bba1..c4225c2 100644 --- a/plugin/avtodor-tr.py +++ b/plugin/avtodor-tr.py @@ -29,7 +29,9 @@ def get_balance(login, password, storename=None): response1 = session.post(url, files=files) if response1.status_code != 200: raise RuntimeError(f'POST Login page {url} error: status_code {response1.status_code}') - result['Balance'] = re.search(re_balance, response1.text).group(1).replace(',', '.').strip() + bal = re.search(re_balance, response1.text).group(1).replace(',', '.').strip() + result['Balance'] = re.sub('(?usi)[^\d.,]', '', bal) + try: result['userName'] = re.search(re_userName, response1.text).group(1).replace(' ', '').strip() except Exception: