fixing rating command (#5081)

This commit is contained in:
andrewkenreich
2023-05-31 09:05:58 -04:00
committed by GitHub
parent 76fcaf77da
commit d1f734243e

View File

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