fintwit-bot
fintwit-bot copied to clipboard
Yahoo_fin earnings are broken...
Traceback (most recent call last): File "/home/akkie100/.local/lib/python3.9/site-packages/discord/ext/tasks/init.py", line 198, in _loop raise exc File "/home/akkie100/.local/lib/python3.9/site-packages/discord/ext/tasks/init.py", line 169, in _loop await self.coro(*args, **kwargs) File "/home/akkie100/FinTwit_Bot/src/cogs/loops/earnings_overview.py", line 85, in earnings earnings_df["ticker"].isin(util.vars.nasdaq_tickers) File "/home/akkie100/.local/lib/python3.9/site-packages/pandas/core/frame.py", line 4090, in getitem indexer = self.columns.get_loc(key) File "/home/akkie100/.local/lib/python3.9/site-packages/pandas/core/indexes/range.py", line 417, in get_loc raise KeyError(key) KeyError: 'ticker'
Earnings are currently broken because of yahoo_fin not keeping up with changes.
https://github.com/wenboyu2/yahoo-earnings-calendar/pull/35/files
Maybe change our own implementation of utils/earnings_scraper.py to fix it
implementation + yahoo-earnings-calendar does not work
Could scrape https://api.nasdaq.com/api/calendar/upcoming / https://api.nasdaq.com/api/calendar/earnings?date=2024-05-20 instead