1
0
mirror of https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot.git synced 2025-06-16 15:06:53 +00:00

bug where symbol had no dividend

This commit is contained in:
Anson Biggs 2021-02-24 23:18:07 -07:00
parent bbb73c8405
commit 2422489bba

View File

@ -282,7 +282,7 @@ _Donations can only be made in a chat directly with @simplestockbot_
IEXurl = f"https://cloud.iexapis.com/stable/stock/{symbol}/dividends/next?token={self.IEX_TOKEN}"
response = r.get(IEXurl)
if response.status_code == 200:
if response.status_code == 200 and response.json():
IEXData = response.json()[0]
keys = (
"amount",