Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screener header now includes whitespace characters #166

Open
oboxer opened this issue Apr 27, 2023 · 3 comments
Open

Screener header now includes whitespace characters #166

oboxer opened this issue Apr 27, 2023 · 3 comments

Comments

@oboxer
Copy link

oboxer commented Apr 27, 2023

As of 2023/04/27, this is the new table header from finviz.
['No.', '\r\n ', '\r\n', 'Ticker', 'Company', 'Sector', 'Industry', 'Country', 'Market Cap', 'P/E', 'Price', 'Change', 'Volume']

@atreyasinha
Copy link

{'No.': '1', '\r\n ': 'ABCB', '\r\n': 'Ameris Bancorp', 'Ticker': 'Financial', 'Company': 'Banks - Regional', 'Sector': 'USA', 'Industry': '2.30B', 'Country': '6.54', 'Market Cap': '33.86', 'P/E': '3.74%', 'Price': '142,889'}......can we get this fixed ASAP please.

@oboxer
Copy link
Author

oboxer commented Apr 27, 2023

Replace below in this method __get_table_headers. Someone please feel free to create PR

    def __get_table_headers(self):
        """ Private function used to return table headers. """

        headers = self._page_content.cssselect(
            'tr[valign="middle"]')[0].xpath("td//text()")
        # remove \r\n in headers
        return list(filter(lambda x: x.strip(), headers))

@JonHolman
Copy link

@oboxer 's fix is in a PR now #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants