Skip to content

Commit

Permalink
bugfixing
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Jul 24, 2024
1 parent 1613785 commit 958e89a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/cron_cramer_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 958e89a

Please sign in to comment.