From 0579b9af0fd14610027a538188ad15495db23543 Mon Sep 17 00:00:00 2001 From: Wong Yiek Heng Date: Mon, 6 Oct 2025 07:28:36 +0800 Subject: [PATCH] debug --- cm_bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cm_bot.py b/cm_bot.py index 5f2c88f..94e815a 100644 --- a/cm_bot.py +++ b/cm_bot.py @@ -444,7 +444,8 @@ class CM_BOT: return float(soup.find('table', {'class': 'generalContent'}).find(text=re.compile('Credit Available')).parent.parent.find_all('td')[2].text) except: print(f"Error getting credit.") - with open(f'{datetime.datetime.now().strftime('%Y%m%d_%H%M')}.html', 'wb') as f: + now = datetime.datetime.now().strftime('%Y%m%d_%H%M') + with open(f'credit-{now}.html', 'wb') as f: f.write(response.content) return 0