-
Notifications
You must be signed in to change notification settings - Fork 276
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
issue with \screener.py #161
Comments
this was fixed in the current Master release. Thank you. I downloaded it and manually replaced the scripts. works well. Thank you |
I have opened a pull request with a fix as this issue continues. |
I am also seeing the IndexError on initialization. How do I pip install the pull request with the fix? |
Thank you, please keep me posted |
`~\anaconda3\lib\site-packages\finviz\screener.py in init(self, tickers, filters, rows, order, signal, table, custom, user_agent, request_method) ~\anaconda3\lib\site-packages\finviz\screener.py in __search_screener(self) ~\anaconda3\lib\site-packages\finviz\screener.py in __check_rows(self) NoResults: No results found for query: v=141&t=&f=exch_nasd%2Cidx_sp500&o=price&s=&c=` The core issue appears to be that the scrape module in screener.py is no longer functioning properly. In the check_rows function, total_rows is set to scrape.get_total_rows. which is returning no result. The issue appears to be in the scraper_functions.py module. I suspect, but have not investigated deeply enough yet that the get_table function in scraper_functions.py is malfunctioning due to a new html structure at Finviz. Here is the current code of that function: `
` I am guessing all_rows is likely where the problem resides. |
I have been trying to just pull a stock list of all stocks on Finviz.com and my script was working just fine.
Then all of a sudden it stopped with this error.
finviz\screener.py", line 128, in init
self.data = self.__search_screener()
Research says it is something to do with starting with 0 versus a 1, but i cannot find it in the code.
here is the script i am running.
`from finviz.screener import Screener
import datetime
stock_list = Screener()
print(type(stock_list))
stock_list.to_csv('finviz_stocks_list'+(datetime.datetime.now().date().strftime('%m-%d-%Y')+'.csv'))
`
The text was updated successfully, but these errors were encountered: