@ -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)