bugfixing

This commit is contained in:
MuslemRahimi 2024-10-17 09:41:30 +02:00
parent 673687c023
commit a1d7287ee5

View File

@ -301,7 +301,7 @@ try:
con = sqlite3.connect('stocks.db') con = sqlite3.connect('stocks.db')
cursor = con.cursor() cursor = con.cursor()
cursor.execute("PRAGMA journal_mode = wal") cursor.execute("PRAGMA journal_mode = wal")
cursor.execute("SELECT DISTINCT symbol FROM stocks") cursor.execute("SELECT DISTINCT symbol FROM stocks WHERE (exchangeShortName = 'NYSE' OR exchangeShortName = 'NASDAQ' or exchangeShortName = 'AMEX')")
symbols = [row[0] for row in cursor.fetchall()] symbols = [row[0] for row in cursor.fetchall()]
#Filter out tickers #Filter out tickers
symbols = [symbol for symbol in symbols if symbol != "STEC"] symbols = [symbol for symbol in symbols if symbol != "STEC"]
@ -318,7 +318,6 @@ try:
with open(f"json/market-movers/pre-post-data.json", 'w') as file: with open(f"json/market-movers/pre-post-data.json", 'w') as file:
ujson.dump(data, file) ujson.dump(data, file)
con.close() con.close()
except Exception as e: except Exception as e:
print(e) print(e)