From 8d932e849fe3a74ec362cef2c2b6faed85cb0fb7 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Tue, 7 Feb 2023 21:21:07 +0100 Subject: [PATCH] bugfixes --- screenshotter/config.yaml | 2 +- screenshotter/rootfs/app/app.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/screenshotter/config.yaml b/screenshotter/config.yaml index 8725a43..31e817e 100644 --- a/screenshotter/config.yaml +++ b/screenshotter/config.yaml @@ -1,6 +1,6 @@ --- name: Screenshotter -version: 1.0.1 +version: 1.0.1.1 #image: ghcr.io/maxwinterstein/homeassistant-addon-toogoodtogo-ha-mqtt-bridge-{arch} slug: screenshotter description: Screenshot images for E-Paper pricetags diff --git a/screenshotter/rootfs/app/app.py b/screenshotter/rootfs/app/app.py index dfe4072..12cbc10 100644 --- a/screenshotter/rootfs/app/app.py +++ b/screenshotter/rootfs/app/app.py @@ -41,11 +41,12 @@ while True: for task in tasks: if task["next_execution"] > now: continue + print(f"Running {task['name']}") driver = webdriver.Chrome(options=chrome_options, desired_capabilities=d) driver.implicitly_wait(10) driver.get(task["url"]) # pause 3 second to let page loads - time.sleep(wait) + time.sleep(int(wait)) # save screenshot file_name = f'/tmp/{task["name"]}.png' driver.save_screenshot(file_name)