diff --git a/database_caller.py b/database_caller.py index 4fd8519..d62debf 100755 --- a/database_caller.py +++ b/database_caller.py @@ -215,7 +215,7 @@ def updateStocks(api_key, logf): for symbol in symbols: try: 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']} except: pass