update db
This commit is contained in:
parent
c6ed6745ac
commit
5221bc5e96
@ -213,22 +213,22 @@ class StockDatabase:
|
||||
for stock in stocks:
|
||||
exchange_short_name = stock.get('exchangeShortName', '')
|
||||
ticker_type = stock.get('type', '')
|
||||
if exchange_short_name in ['XETRA','NYSE', 'NASDAQ','AMEX', 'PNK','EURONEXT'] and ticker_type in ['stock']:
|
||||
if exchange_short_name in ['NYSE', 'NASDAQ','AMEX', 'PNK'] and ticker_type in ['stock']:
|
||||
symbol = stock.get('symbol', '')
|
||||
if exchange_short_name == 'PNK' and symbol not in ['ODYS','FSRNQ','TSSI','DRSHF','NTDOY','OTGLF','TCEHY', 'KRKNF','BYDDY','XIACY','NSRGY','TLPFY','TLPFF']:
|
||||
pass
|
||||
elif exchange_short_name == 'EURONEXT' and symbol not in ['ALEUP.PA','ALNEV.PA','ALGAU.PA','ALDRV.PA','ALHYG.PA','ALVMG.PA','TEP.PA']:
|
||||
pass
|
||||
else:
|
||||
name = stock.get('name', '')
|
||||
exchange = stock.get('exchange', '')
|
||||
#if exchange_short_name == 'PNK' and symbol not in ['RNMBF','ODYS','FSRNQ','TSSI','DRSHF','NTDOY','OTGLF','TCEHY', 'KRKNF','BYDDY','XIACY','NSRGY','TLPFY','TLPFF']:
|
||||
# pass
|
||||
#elif exchange_short_name == 'EURONEXT' and symbol not in ['ALEUP.PA','ALNEV.PA','ALGAU.PA','ALDRV.PA','ALHYG.PA','ALVMG.PA','TEP.PA']:
|
||||
# pass
|
||||
#else:
|
||||
name = stock.get('name', '')
|
||||
exchange = stock.get('exchange', '')
|
||||
|
||||
#if name and '-' not in symbol:
|
||||
if name:
|
||||
symbols.append(symbol)
|
||||
names.append(name)
|
||||
#if name and '-' not in symbol:
|
||||
if name:
|
||||
symbols.append(symbol)
|
||||
names.append(name)
|
||||
|
||||
ticker_data.append((symbol, name, exchange, exchange_short_name, ticker_type))
|
||||
ticker_data.append((symbol, name, exchange, exchange_short_name, ticker_type))
|
||||
|
||||
|
||||
self.cursor.execute("BEGIN TRANSACTION") # Begin a transaction
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user