yfinance Ticker 方法返回未授权的问题是否有解决方法?

huangapple go评论52阅读模式
英文:

Is there a way around the yfinance Ticker method returning that I'm not authorized?

问题

yfinance.Ticker(版本0.2.22)在过去的两个月中一直运行良好:

hndl = yf.Ticker(symb)
info = hndl.info

今天立即失败 - 返回:

HTTPError: 401 客户端错误:未经授权的URL:https://query2.finance.yahoo.com/v10/finance/quoteSummary/AAGIY?modules=summaryProfile%2CfinancialData%2CquoteType%2CdefaultKeyStatistics%2CassetProfile%2CsummaryDetail&ssl=true

链接的页面显示:

yfinance Ticker 方法返回未授权的问题是否有解决方法?

我注意到这是多年来一直存在的问题。是否有预期的解决方案?或者,最好探索获取市场数据的替代方法?

TIA

英文:

yfinance.Ticker (version 0.2.22) was working for my well for the past 2 months:

    hndl = yf.Ticker(symb)
    info = hndl.info

Today it fails immediately - returning:

HTTPError: 401 Client Error: Unauthorized for url: https://query2.finance.yahoo.com/v10/finance/quoteSummary/AAGIY?modules=summaryProfile%2CfinancialData%2CquoteType%2CdefaultKeyStatistics%2CassetProfile%2CsummaryDetail&ssl=true

Linked page shows:

yfinance Ticker 方法返回未授权的问题是否有解决方法?

I note that this has been a recurrent problem over the years. Is there anticipated to be a solution? Or, better to explore alternative ways of getting market data?

TIA

答案1

得分: 2

尝试升级yfinance:pip install --upgrade yfinance

英文:

Try upgrading yfinance: pip install --upgrade yfinance

答案2

得分: 1

这里是为了科学、研究和发现。yfinance最近一定又改了什么,以阻碍我们。

英文:

here for the science, research, and discovery. yfinance must have changed something recently again to hinder us.

huangapple
  • 本文由 发表于 2023年7月13日 20:19:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76679318.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定