我是 Python 新手,我正在尝试探索 yfinance
。这在几个月前有效,但最近当我尝试使用任何 yfinance
模块执行我的代码时,出现以下错误:
import yfinance as yf
stock='AAPL'
stock_yfin=yf.Ticker("{}".format(stock))
# show institutional holders
stock_yfin.institutional_holders
------------>
HTTPError: HTTP Error 404: Not Found
有没有办法解决这个问题?我已经考虑过更改我的标题和会话信息,但似乎无法弄清楚。
答案 0 :(得分:1)
将您的 yfinance
软件包更新为:
pip install yfinance --upgrade --no-cache-dir
在您使用的虚拟环境或全局范围内。