Add readme and final improvements

This commit is contained in:
2024-01-30 20:36:32 +01:00
parent 849a076b51
commit e8a4b83843
4 changed files with 25 additions and 4 deletions

View File

@@ -50,5 +50,6 @@ if __name__ == "__main__":
products_on_sale = [product for product in product_info if product["discount"] > 0]
sender = EmailSender(os.environ["SCRAPER_SMTP_USER"], os.environ["SCRAPER_SMTP_PASSWORD"])
sender.send_email(os.environ["SCRAPER_SMTP_USER"], products_on_sale)
if len(products_on_sale) > 0:
sender = EmailSender(os.environ["SCRAPER_SMTP_USER"], os.environ["SCRAPER_SMTP_PASSWORD"])
sender.send_email(os.environ["SCRAPER_SMTP_USER"], products_on_sale)