* 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:
Colin Delahunty
2022-11-01 15:45:25 +01:00
committed by GitHub
parent ab1453bb60
commit 36a5166d1b
4 changed files with 38111 additions and 34939 deletions

View File

@@ -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:

View File

@@ -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)