summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrewkenreich <andrew.kenreich@gmail.com>2023-05-31 09:05:58 -0400
committerGitHub <noreply@github.com>2023-05-31 13:05:58 +0000
commitd1f734243ec5e0db95e59108c6c9c53258f3f4eb (patch)
tree66e1ab1883eb9ba234c842e9dc1c33fbb0c8f918
parent76fcaf77daea26bbd4a4adf9330f2434d7092d42 (diff)
fixing rating command (#5081)
-rw-r--r--openbb_terminal/stocks/fundamental_analysis/finviz_model.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbb_terminal/stocks/fundamental_analysis/finviz_model.py b/openbb_terminal/stocks/fundamental_analysis/finviz_model.py
index 33f27c05f9e..8e36c853e5a 100644
--- a/openbb_terminal/stocks/fundamental_analysis/finviz_model.py
+++ b/openbb_terminal/stocks/fundamental_analysis/finviz_model.py
@@ -87,7 +87,8 @@ def get_analyst_price_targets_workaround(
'table[class="js-table-ratings fullview-ratings-outer"]'
)[0]
- for row in table:
+ # skip first row of table since its the header
+ for row in table[1:]:
rating = row.xpath("td//text()")
rating = [
val.replace("→", "->").replace("$", "") for val in rating if val != "\n"