-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
401 Client Error: Unauthorized for url: #1952
Comments
Having same issues. Operating system Region: USA yfinance version |
Same issue also. |
Same issue - worked fine a few days ago. Upgrading yfinance does not solve: |
Same issue - worked earlier today. |
Same issue - worked fine few hours ago OS: Windows 11 |
Same issue - worked last week OS: Windows 11 |
The issue ties back to the crumb. It's likely Yahoo changed something with their cookies or how they expect to receive the crumb. |
I had the same issue yesterday, but now it works again. |
its randomly back working for me too |
Describe bug
An issue occurs when attempting to fetch stock information using the yfinance library. The request results in a 401 Client Error: Unauthorized.
import yfinance as yf
msft = yf.Ticker("MSFT")
get all stock info
msft.info
401 Client Error: Unauthorized for url: https://query2.finance.yahoo.com/v10/finance/quoteSummary/MSFT?modules=financialData%2CquoteType%2CdefaultKeyStatistics%2CassetProfile%2CsummaryDetail&corsDomain=finance.yahoo.com&formatted=false&symbol=MSFT&crumb=2abgHhN2kUC
Environment:
Operating System: Windows 10, Windows 11
Region: Europe
both current yfinance version
Simple code that reproduces your problem
import yfinance as yf
msft = yf.Ticker("MSFT")
get all stock info
msft.info
Debug log
...
Bad data proof
No response
yfinance
version0.2.40
Python version
Python 3.11.4
Operating system
W10/11
The text was updated successfully, but these errors were encountered: