eshan6704 commited on
Commit
7aa41a0
·
verified ·
1 Parent(s): f4ca6dd

Update qresult.py

Browse files
Files changed (1) hide show
  1. qresult.py +4 -4
qresult.py CHANGED
@@ -2,15 +2,15 @@
2
  import yfinance as yf
3
  import pandas as pd
4
  from common import make_table, wrap_html, format_large_number, html_error
5
-
6
  def fetch_qresult(symbol):
7
  """
8
  Fetch quarterly financials for a stock symbol and return HTML
9
  """
10
- yfsymbol = symbol + ".NS"
11
  try:
12
- ticker = yf.Ticker(yfsymbol)
13
- df = ticker.quarterly_financials
14
 
15
  if df.empty:
16
  return wrap_html(f"<h1>No quarterly results available for {symbol}</h1>")
 
2
  import yfinance as yf
3
  import pandas as pd
4
  from common import make_table, wrap_html, format_large_number, html_error
5
+ from yf import qresult
6
  def fetch_qresult(symbol):
7
  """
8
  Fetch quarterly financials for a stock symbol and return HTML
9
  """
10
+
11
  try:
12
+
13
+ df = qresult(symbol)
14
 
15
  if df.empty:
16
  return wrap_html(f"<h1>No quarterly results available for {symbol}</h1>")