mariostoev/finviz

get_stock() IndexError: list index out of range on line to fetch `company_details`

Opened this issue · 0 comments

When running PR #202 Getting this error:

File "/src/finviz/main_func.py", line 37, in get_stock
company_details = title.cssselect('h2[class="quote-header_ticker-wrapper_company"]')[0]
IndexError: list index out of range

Root cause:
Finviz has added a new text-xl class name in the h2

<h2 class="quote-header_ticker-wrapper_company text-xl">
   ...
</h2>

PR #204 fixes this issue