remove prints and shit
All checks were successful
Build and push / changes (push) Successful in 3s
Build and push / Lint-Python (push) Successful in 2s
Build and push / Build-and-Push-Docker (push) Successful in 19s
Build and push / post-status-to-discord (push) Successful in 2s
Build and push / sync-argocd-app (push) Successful in 3s
All checks were successful
Build and push / changes (push) Successful in 3s
Build and push / Lint-Python (push) Successful in 2s
Build and push / Build-and-Push-Docker (push) Successful in 19s
Build and push / post-status-to-discord (push) Successful in 2s
Build and push / sync-argocd-app (push) Successful in 3s
This commit is contained in:
parent
02ab5fa300
commit
3dfdd5055d
@ -2,8 +2,6 @@ import discord
|
|||||||
import yfinance as yf
|
import yfinance as yf
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pprint
|
|
||||||
|
|
||||||
|
|
||||||
def parse_message(symbols, verbose):
|
def parse_message(symbols, verbose):
|
||||||
embeds = []
|
embeds = []
|
||||||
@ -101,11 +99,9 @@ def get_stock(share_name, verbose=False, fast=False):
|
|||||||
current_price = request["lastPrice"]
|
current_price = request["lastPrice"]
|
||||||
else:
|
else:
|
||||||
request = yf.Ticker(share_name).info
|
request = yf.Ticker(share_name).info
|
||||||
# pprint.pprint(request)
|
|
||||||
current_change = request["ask"] - request["open"]
|
current_change = request["ask"] - request["open"]
|
||||||
current_price = request["ask"]
|
current_price = request["ask"]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# print(e)
|
|
||||||
raise ValueError("Invalid symbol %s: empty response from Yahoo" % share_name)
|
raise ValueError("Invalid symbol %s: empty response from Yahoo" % share_name)
|
||||||
|
|
||||||
# If stock price has gone down since open, use red and a sad stonk meme
|
# If stock price has gone down since open, use red and a sad stonk meme
|
||||||
|
Loading…
x
Reference in New Issue
Block a user