ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
13.15k stars 2.33k forks source link

get_news: raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #1440

Closed williamc1998 closed 1 year ago

williamc1998 commented 1 year ago

raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) specifically after using get_news, I pass info over to frontend. this was working before so is this a new issue relating to the new encryption? edit: this was working about 6 hours ago and is a new issue. additionally, performance seems to have taken a massive hit I've been forced to switch to alpha vantage

williamc1998 commented 1 year ago

site-packages/yfinance/base.py", line 1606, in get_news data = data.json()

ivan23kor commented 1 year ago

@williamc1998 the following code works:

import yfinance as yf
ticker = yf.Ticker('SPY')
print(ticker.news)

Please upload a reproducer code.