From a417c3f7d534a9581e616abf9e19fbea023233ac Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Fri, 29 Nov 2019 09:44:27 +1100 Subject: [PATCH] Fix output directory --- spectur_live_view.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spectur_live_view.py b/spectur_live_view.py index 46e2728..5a9335f 100644 --- a/spectur_live_view.py +++ b/spectur_live_view.py @@ -26,7 +26,7 @@ URL = 'https://camera.uwatchit.com.au/UWatchitWebV2/User/LiveView#' OUTPUT_DIR = 'images' TIMEZONE = 'Australia/Sydney' WAIT_TIME = 0.1 -RECORDING_DURATION = 20 +RECORDING_DURATION = 120 SILENT = True IMAGE_MASK = 'mask/overtopping-mask.png' username = '' @@ -41,7 +41,7 @@ height = next_high_tide.rsplit('_', 1)[-1] now = datetime.now() year = now.strftime('%Y') timestamp = now.strftime('%Y-%m-%d_%H-%M') -current_hightide_dir = os.path.join(OUTPUT_DIR, year, f'{timestamp}_{height}') +current_hightide_dir = os.path.join(pwd, OUTPUT_DIR, year, f'{timestamp}_{height}') def start_session(): @@ -53,7 +53,7 @@ def start_session(): # Start webdriver options = Options() options.headless = True - executable_path = os.path.join(pwd, 'geockdriver') + executable_path = os.path.join(pwd, 'geckodriver') driver = webdriver.Firefox(executable_path=executable_path, options=options) return driver @@ -257,6 +257,7 @@ def get_brightness(jpg_name, mask): # Create counter t = [] + # Open browser get_images()