diff --git a/screenshotter/config.yaml b/screenshotter/config.yaml index 8761793..8725a43 100644 --- a/screenshotter/config.yaml +++ b/screenshotter/config.yaml @@ -1,6 +1,6 @@ --- name: Screenshotter -version: 1.0.0.41 +version: 1.0.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 8d56ab1..dfe4072 100644 --- a/screenshotter/rootfs/app/app.py +++ b/screenshotter/rootfs/app/app.py @@ -32,7 +32,7 @@ with open(config_file, "r") as stream: tasks = [] -for image in config.images: +for image in config["images"]: image["next_execution"] = datetime.datetime.now() tasks += [image] @@ -43,7 +43,7 @@ while True: continue driver = webdriver.Chrome(options=chrome_options, desired_capabilities=d) driver.implicitly_wait(10) - driver.get(url + paths.get(display)) + driver.get(task["url"]) # pause 3 second to let page loads time.sleep(wait) # save screenshot