From 958e89a213c2bcd8491e4827a68ac46a7a80a379 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Wed, 24 Jul 2024 22:45:05 +0200 Subject: [PATCH] bugfixing --- app/cron_cramer_tracker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/cron_cramer_tracker.py b/app/cron_cramer_tracker.py index 68d717f..da99e96 100644 --- a/app/cron_cramer_tracker.py +++ b/app/cron_cramer_tracker.py @@ -4,6 +4,7 @@ from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.chrome.service import Service +from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options from dotenv import load_dotenv import sqlite3 @@ -34,6 +35,7 @@ def main(): options.add_argument("--disable-dev-shm-usage") # Initialize the WebDriver + service = Service(ChromeDriverManager().install()) driver = webdriver.Chrome(options=options) try: @@ -63,7 +65,7 @@ def main(): res.append({**item, 'name': db_data['name'].iloc[0], 'sector': db_data['sector'].iloc[0]}) except Exception as e: pass - + # Save the JSON data if len(res) > 0: save_json(res, 'json/cramer-tracker/data.json')