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