bugfixing

This commit is contained in:
MuslemRahimi 2024-11-15 13:27:29 +01:00
parent 6fd533937d
commit 8734217115

View File

@ -118,7 +118,7 @@ async def get_upcoming_earnings(session, end_date):
try: try:
async with session.get(url, params=querystring, headers=headers) as response: async with session.get(url, params=querystring, headers=headers) as response:
res = ujson.loads(await response.text())['earnings'] res = ujson.loads(await response.text())['earnings']
#res = [e for e in res if datetime.strptime(e['date'], "%Y-%m-%d").date() != date.today() or datetime.strptime(e['time'], "%H:%M:%S").time() >= datetime.strptime("16:00:00", "%H:%M:%S").time()] res = [e for e in res if datetime.strptime(e['date'], "%Y-%m-%d").date() != date.today() or datetime.strptime(e['time'], "%H:%M:%S").time() >= datetime.strptime("16:00:00", "%H:%M:%S").time()]
for item in res: for item in res:
try: try:
symbol = item['ticker'] symbol = item['ticker']