diff --git a/spectur_live_view.py b/spectur_live_view.py index 390b99a..f74a0ed 100644 --- a/spectur_live_view.py +++ b/spectur_live_view.py @@ -4,6 +4,7 @@ Open an automated selenium webdriver, and download images from Live View mode. """ import os +import sys import time import pytz from io import BytesIO @@ -160,6 +161,10 @@ def get_next_image(driver, cookies): if current_time not in t: t.append(current_time) + # Check if recording has completed + if t[-1] - t[0] > RECORDING_DURATION: + sys.exit() + # Count images collected n = len(t)