ranaroussi / yfinance

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

fc.yahoo.com on port 443 (https) is not reachable #1924

Open sergiomnb opened 1 month ago

sergiomnb commented 1 month ago

Describe bug

I had used this library some time ago and everything was fine ,I take it up again today and it doesn't work. What must have changed ? did they put a token ? what are these crumbs ? nothing is documented , search and search but nothing to do. So ,like in the good old days ,I edited the file data.py line 163 and changed fc.yahaoo.com with url='https://finance.yahoo.com/quote/AMD',. Now it works.

Simple code that reproduces your problem

https://fc.yahoo.com/ on browser

Debug log

DEBUG Entering download() DEBUG Disabling multithreading because DEBUG logging enabled DEBUG Entering history() DEBUG Entering _fetch_ticker_tz() DEBUG Entering get() DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/ACN DEBUG params=frozendict.frozendict({'range': '1d', 'interval': '1d'}) DEBUG Entering _get_cookie_and_crumb() DEBUG cookie_mode = 'basic' DEBUG Entering _get_cookie_and_crumb_basic() ERROR Failed to get ticker 'ACN' reason: HTTPSConnectionPool(host='fc.yahoo.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fb0d6219a10>: Failed to establish a new connection: [Errno 111] Connection refused'))

Bad data proof

No response

yfinance version

0.2.38

Python version

No response

Operating system

No response

i418c commented 1 month ago

Check that the domain isn't blocked by a DNS blocker like PiHole.

TobiasLaving commented 4 weeks ago

Also had this issue, editing the file works

To put the pihole discussion to rest I tried with both my wifi and carrier, same result. Perhaps the fc domain is not working in some parts of the world? I am in sweden for example.