pandas-datareader icon indicating copy to clipboard operation
pandas-datareader copied to clipboard

get_quote_yahoo is not working any more...

Open YanAnastasiadi opened this issue 2 years ago • 4 comments

Hi, today noticed that get_quote_yahoo is not working any more... Comes back with error:

pandas_datareader._utils.RemoteDataError: Unable to read URL: https://query1.finance.yahoo.com/v7/finance/quote?symbols=9888.HK&lang=en-US&corsDomain=finance.yahoo.com&.tsrc=finance Response Text: b'{"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Cookie"}}}'

Does anybody know what may be the problem?

YanAnastasiadi avatar May 09 '23 08:05 YanAnastasiadi

I'm having the same problem as well. I have no idea what could be the issue

Edit: changing the link for reading from 'v7' to 'v6' seems to be a quick fix to solve the issue. All you need to do is go to line 45 in quotes.py and replace

return "https://query1.finance.yahoo.com/v7/finance/quote"

with

return "https://query1.finance.yahoo.com/v6/finance/quote"

("v7" with "v6") while it doesn't get solved by the devs managing this library.

When it gets solved, I assume that updating the package should be enough

knoghax avatar May 14 '23 13:05 knoghax

Looks like the work around of changing the version is not working anymore? Anybody has found a way to use get_quote_yahoo without getting errors ?

technomupet67 avatar May 24 '23 08:05 technomupet67

Looks like Yahoo is moving to a paid model for Finance API access: https://docs.google.com/forms/d/e/1FAIpQLSeyb7xMtZFjoNYI7XG1rjlhUopKAxdLAfSRcaPxg9p-9ii-_g/viewform

eriknh avatar May 25 '23 19:05 eriknh

Check #952

shadiakiki1986 avatar Nov 22 '23 18:11 shadiakiki1986