replace .replace('BRK-A', 'BRK.A').replace('BRK-B', 'BRK.B')
This commit is contained in:
parent
3b1c5a7d55
commit
0ea3abf9d0
@ -215,7 +215,7 @@ def updateStocks(api_key, logf):
|
|||||||
for symbol in symbols:
|
for symbol in symbols:
|
||||||
try:
|
try:
|
||||||
for stock in data['quoteResponse']['result']:
|
for stock in data['quoteResponse']['result']:
|
||||||
if stock['symbol'] == symbol:
|
if stock['symbol'].replace('BRK-A', 'BRK.A').replace('BRK-B', 'BRK.B') == symbol:
|
||||||
stock_info[stock['symbol'].replace('BRK-A', 'BRK.A').replace('BRK-B', 'BRK.B')] = {'current': stock['regularMarketPrice'], 'change': stock['regularMarketChange'], 'percent_change':stock['regularMarketChangePercent']}
|
stock_info[stock['symbol'].replace('BRK-A', 'BRK.A').replace('BRK-B', 'BRK.B')] = {'current': stock['regularMarketPrice'], 'change': stock['regularMarketChange'], 'percent_change':stock['regularMarketChangePercent']}
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user