yahoofinancials
yahoofinancials copied to clipboard
Get_financial_stmts still return None
I have tried and tried to search for solutions, but ticker="AAPL" YahooFinancials(ticker).get_financial_stmts("annual",["income","cash","balance"]) returns {'incomeStatementHistory': {'AAPL':None}, 'cashflowStatementHistory':{'AAPL':None}, 'balanceSheetHistory':{'AAPL':None}}
Is there any way to solve this so that I get the financial statements?
I have got the same issue. Anyone has any insight?
Also had the same issue after adding the BeautifulSoup fix, that I got these None
results.
@syrakusmrdrte, @CDCDM1986 I Fixed it by adding the second user-agent header change fix. Perhaps Yahoo is blocking the previous one, but seems like they at least respond HTTP 200 so not sure.
Hey biggestT. I did quite understand your solution.
wow @biggestT thank you that fixed it!!
wow @biggestT thank you that fixed it!!
Can you tell me what did you do?
Also had the same issue after adding the BeautifulSoup fix, that I got these
None
results.@syrakusmrdrte, @CDCDM1986 I Fixed it by adding the second user-agent header change fix. Perhaps Yahoo is blocking the previous one, but seems like they at least respond HTTP 200 so not sure.
I'm sorry, I am a beginner programer. I am not sure what to do with that information, can you tell me how to actually apply your solution?
My biggest appreciation in advance!
@Frodriguez9 i made the edits in the yahoofinancials/__init__.py that was linked to. here's the fully fixed file that works for me - https://gist.github.com/avelaga/762142a778c2e3a969fbb78ec351d6e8
you want to replace python3
to open a python shell
import sys
print(sys.path)
exit()
to find the python path and search through those to find yahoofinancials
these are the file paths where i found it on different machines: in aws: /usr/local/lib/python3.7/site-packages/yahoofinancials in raspian: /home/pi/.local/lib/python3.7/site-packages/yahoofinancials in macos: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/yahoofinancials
hope that helps!
@avelaga thank you so much! it worked!.
I was telling a friend that one of the things I've enjoyed the most since I started to become involved with IT was to find such helpful community of programers. You guys are always willing to assist others.
No wonder why IT keeps evolving more rapidly than all other industries combined. Thank you so much!
@Frodriguez9 awesome!! yeah the online community is amazing, i've gotten a ton of help myself on reddit especially. its an amazing field and really rewarding to share it with others. im glad i could help :)
@biggestT That solution works for me too! Many thanks!