lit26 / finvizfinance

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

Screeners not pulling any data #41

Closed Sanketh-Nagarajan closed 2 years ago

Sanketh-Nagarajan commented 2 years ago

Hi,

I am trying to import technical data from finviz using the following piece of code:

from finvizfinance.screener.technical import Technical

finviz_scan_technical = Technical() technical_df = finviz_scan_technical.screener_view()

But the output says 'No Tickers found.'. As you can see, I have not set any filters but still the function is not retrieving any data. Did some setting change on finviz's side to cause this failure?

Btw, I am using version "0.11.0"

Thanks

lit26 commented 2 years ago

I think it is due to change on finviz side. The package fail to fetch page information. All the screeners have the same issue. I will fix this ASAP.

lit26 commented 2 years ago

The package is updated. Please check the new version. Thanks for reporting.

Sanketh-Nagarajan commented 2 years ago

I upgraded the package and I am getting the following error for the same piece of code:

line 283, in screener_view table = soup.findAll("table")[18] IndexError: list index out of range

lit26 commented 2 years ago

My mistake. I change in one place but forget to change this one. Sorry.

lit26 commented 2 years ago

Please directly pull from the repo to see if it is working. If not I will push a new version to PyPi. Thanks.

Sanketh-Nagarajan commented 2 years ago

I tried pulling directly from the repo. still getting the same error while loading page.

lit26 commented 2 years ago

Can you share the python script and the error? Since I didn't get this error.

Sanketh-Nagarajan commented 2 years ago

finviz_scan_technical = Technical() technical_df = finviz_scan_technical.screener_view()

[Info] loading page [------------------------------] 1/429 [Info] loading page [------------------------------] 2/429 [Info] loading page [------------------------------] 3/429 [Info] loading page [------------------------------] 4/429 [Info] loading page [------------------------------] 5/429 [Info] loading page [------------------------------] 6/429 [Info] loading page [------------------------------] 7/429 [Info] loading page [#-----------------------------] 8/429 [Info] loading page [#-----------------------------] 9/429 [Info] loading page [#-----------------------------] 10/429 [Info] loading page [#-----------------------------] 11/429 [Info] loading page [#-----------------------------] 12/429 [Info] loading page [#-----------------------------] 13/429 [Info] loading page [#-----------------------------] 14/429 [Info] loading page [#-----------------------------] 15/429 [Info] loading page [#-----------------------------] 16/429 [Info] loading page [#-----------------------------] 17/429 [Info] loading page [#-----------------------------] 18/429 [Info] loading page [#-----------------------------] 19/429 [Info] loading page [#-----------------------------] 20/429 [Info] loading page [#-----------------------------] 21/429 [Info] loading page [##----------------------------] 22/429 [Info] loading page [##----------------------------] 23/429 [Info] loading page [##----------------------------] 24/429 Traceback (most recent call last): File "C:\Users\XXX\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3331, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 3, in technical_df = finviz_scan_technical.screener_view() File "C:\Users\XXX\Anaconda3\lib\site-packages\finvizfinance\screener\overview.py", line 283, in screener_view table = soup.findAll("table")[18] IndexError: list index out of range

lit26 commented 2 years ago

I think your package is not updated. So the previous error is the number 18. But the current master branch is changed to 19.

Sanketh-Nagarajan commented 2 years ago

It works! Could you please push the new version to PyPi .. Thanks!

lit26 commented 2 years ago

Sure, thanks for helping.

lit26 commented 2 years ago

The package is published on PyPi.