chore: add URL to alert message

This commit is contained in:
agatha 2024-09-15 18:28:37 -04:00
parent 27fa77219c
commit 4f1c36768a

View File

@ -61,7 +61,7 @@ async def main():
logger.info('checking buyvm stocks')
config = load_config('config.json')
bot = MatrixBot(config['matrix'])
memory_filter = config.get('memory', [512, 1, 2, 4, 8, 16, 32]) # Defaults to all sizes
memory_filter = config.get('memory', [512, 1, 2, 4]) # Defaults to price <= $15.00
for url in URLS:
html = get_url(url)
@ -76,7 +76,7 @@ async def main():
if qty > 0 and (memory in memory_filter):
logger.info(f"{package['name']}: {package['qty']} in stock")
await bot.send_message(f"{package['name']}: {package['qty']} in stock")
await bot.send_message(f"🚨 {package['name']}: {package['qty']} in stock 🚨\n{package['url']}")
await bot.close()