mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-05 00:42:19 +00:00
Fix dcf (#3223)
* Added suggestions for load * Fixed a command * Fixed panel * Added fix for dcf * Doing my boi a favor Co-authored-by: James Maslek <jmaslek11@gmail.com> Co-authored-by: Andrew <andrew.kenreich@gmail.com>
This commit is contained in:
@@ -414,7 +414,9 @@ def create_dataframe(symbol: str, statement: str, period: str = "annual"):
|
||||
return pd.DataFrame(), None, None
|
||||
|
||||
soup = BeautifulSoup(r.content, "html.parser")
|
||||
phrase = soup.find("div", attrs={"class": "info-long svelte-f7kao3"})
|
||||
phrase = soup.find(
|
||||
"div", attrs={"class": "hidden pb-1 text-sm text-gray-600 lg:block"}
|
||||
)
|
||||
phrase = phrase.get_text().lower() if phrase else ""
|
||||
|
||||
if "thousand" in phrase:
|
||||
|
||||
@@ -126,7 +126,7 @@ class CreateExcelFA:
|
||||
def get_data(self, statement: str, row: int, header: bool) -> pd.DataFrame:
|
||||
df, rounding, _ = dcf_model.create_dataframe(self.info["symbol"], statement)
|
||||
if df.empty:
|
||||
raise ValueError("Could generate a dataframe for the ticker symbol")
|
||||
raise ValueError("Could not generate a dataframe for the ticker symbol")
|
||||
self.info["rounding"] = rounding
|
||||
if not self.info["len_data"]:
|
||||
self.info["len_data"] = len(df.columns)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user