Open AlexPlatin opened 1 month ago
I see this issue as well.
import yfinance as yf
stock = yf.Ticker("TVSMOTOR.NS")
news = stock.news
print(news)
Returns "random" news or news from the main page.
Edit: Making the raw API call also returns the same faulty news. Looks like the error stems from the URL endpoint.
Same issue, hopefully they will fix the endpoint soon
straight up doesnt work now? raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
straight up doesnt work now? raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Yes, had that yesterday. Today it worked for a while and now it is giving this error again.
Describe bug
I used yfinance to get news from different companies listed on various stock exchanges using method news (.get_news()) and it worked very well.
However, starting from March 2024 the get_news() method returns news not related to given ticker. I believe it now returns news from the main page of Yahoo Finance (see Bad data proof. For example, I asked about "1A9.F" ticker and it returned 'relatedTickers': ['CMOPF'] news)
Simple code that reproduces your problem
Debug log
Bad data proof
yfinance
version0.2.40
Python version
3.10
Operating system
Windows