mirror of
https://git.juggalol.com/agatha/stockbot-buyvm.git
synced 2024-11-16 20:56:40 +00:00
chore: add URL to alert message
This commit is contained in:
parent
27fa77219c
commit
4f1c36768a
@ -61,7 +61,7 @@ async def main():
|
|||||||
logger.info('checking buyvm stocks')
|
logger.info('checking buyvm stocks')
|
||||||
config = load_config('config.json')
|
config = load_config('config.json')
|
||||||
bot = MatrixBot(config['matrix'])
|
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:
|
for url in URLS:
|
||||||
html = get_url(url)
|
html = get_url(url)
|
||||||
@ -76,7 +76,7 @@ async def main():
|
|||||||
|
|
||||||
if qty > 0 and (memory in memory_filter):
|
if qty > 0 and (memory in memory_filter):
|
||||||
logger.info(f"{package['name']}: {package['qty']} in stock")
|
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()
|
await bot.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user