From 1ae8d041f1e4d6ee46f5f3aa4b9cd3550068241e Mon Sep 17 00:00:00 2001 From: Wong Yiek Heng Date: Mon, 6 Oct 2025 07:38:00 +0800 Subject: [PATCH] + Fix credit parsing --- cm_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cm_bot.py b/cm_bot.py index 94e815a..2164c99 100644 --- a/cm_bot.py +++ b/cm_bot.py @@ -441,7 +441,7 @@ class CM_BOT: ) soup = BeautifulSoup(response.content, 'html.parser') try: - return float(soup.find('table', {'class': 'generalContent'}).find(text=re.compile('Credit Available')).parent.parent.find_all('td')[2].text) + return float(soup.find('table', {'class': 'generalContent'}).find(text=re.compile('Credit Available')).parent.parent.find_all('td')[2].text.replace(",","")) except: print(f"Error getting credit.") now = datetime.datetime.now().strftime('%Y%m%d_%H%M')