lit26 / finvizfinance

Finviz analysis python library.
https://finvizfinance.readthedocs.io/en/latest/
MIT License
507 stars 83 forks source link

BUG: If finviz doesnt have ratings table ticker_full_info() fails #65

Closed ranger9692 closed 1 year ago

ranger9692 commented 1 year ago

finvizfinance version checks

Reproducible Example

x = finvizfinance('acon')
x.ticker_full_info()

Issue Description

Traceback (most recent call last):

File "C:\Users\chris\AppData\Local\Temp\ipykernel_20800\477896250.py", line 1, in x2 = x.ticker_full_info()

File "C:\Users\chris\anaconda3\lib\site-packages\finvizfinance\quote.py", line 377, in ticker_full_info self.ticker_outer_ratings()

File "C:\Users\chris\anaconda3\lib\site-packages\finvizfinance\quote.py", line 233, in ticker_outer_ratings rows = fullview_ratingsouter.findAll("td", class="fullview-ratings-inner")

AttributeError: 'NoneType' object has no attribute 'findAll'

Expected Behavior

I think you should have the results return with the ratings with an empty dataframe or a nonetype

Installed Versions

(base) C:\Users\chris>pip show finvizfinance Name: finvizfinance Version: 0.14.4 Summary: Finviz Finance. Information downloader. Home-page: https://github.com/lit26/finvizfinance Author: Tianning Li Author-email: ltianningli@gmail.com License: The MIT License (MIT) Location: c:\users\chris\anaconda3\lib\site-packages Requires: bs4, datetime, lxml, pandas, requests Required-by:
tli26 commented 1 year ago

It seems ACON has no outer rating. I will fix it.

ranger9692 commented 1 year ago

I really appreciate it. Nice package. Thanks for it. -Chris

On Fri, Feb 3, 2023 at 2:18 PM Tianning Li @.***> wrote:

It seems ACON has no outer rating. I will fix it.

— Reply to this email directly, view it on GitHub https://github.com/lit26/finvizfinance/issues/65#issuecomment-1416358978, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQAOI2SJ4AGIMYAR4MUOIXTWVVR2BANCNFSM6AAAAAAUQUWNIQ . You are receiving this because you authored the thread.Message ID: @.***>

ranger9692 commented 1 year ago

Also, does the library give the Income Statement, Balance sheet and Cash Flow? Annual and quarterly?

On Fri, Feb 3, 2023 at 2:18 PM Tianning Li @.***> wrote:

It seems ACON has no outer rating. I will fix it.

— Reply to this email directly, view it on GitHub https://github.com/lit26/finvizfinance/issues/65#issuecomment-1416358978, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQAOI2SJ4AGIMYAR4MUOIXTWVVR2BANCNFSM6AAAAAAUQUWNIQ . You are receiving this because you authored the thread.Message ID: @.***>

tli26 commented 1 year ago

Yup, https://finvizfinance.readthedocs.io/en/latest/quote.html#finvizfinance.quote.Statements

lit26 commented 1 year ago

The issue is fixed in the latest version. Please upgrade your package.

ranger9692 commented 1 year ago

Thanks for the update. Im wondering if your package works behind the paywall of finviz if you have a username and password? I was hoping to grab the groups/industry performance results premarket but it returns last nights results until after open.

On Fri, Feb 3, 2023 at 9:32 PM Tianning Li @.***> wrote:

Closed #65 https://github.com/lit26/finvizfinance/issues/65 as completed.

— Reply to this email directly, view it on GitHub https://github.com/lit26/finvizfinance/issues/65#event-8437798236, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQAOI2WDHHRSL7OP5WMUBR3WVXEWBANCNFSM6AAAAAAUQUWNIQ . You are receiving this because you authored the thread.Message ID: @.***>

lit26 commented 1 year ago

Currently, I am not planning to do that but looking for contributions to this.