Pandas DataReader 不再与 Yahoo Finance 合作 API?

Pandas DataReader is no longer working with the Yahoo Finance API?

我想这个问题是最近才出现的。在我的常规 PC 上,我有一个旧版本的 pandas_datareader,它工作正常,但在我的实例中,我必须安装较新的版本,但它不起作用。它有以下错误-

Yahoo Daily has been immediately deprecated due to large breaks in the API without the introduction of a stable replacement. Pull Requests to re-enable these data connectors are welcome.

我能以某种方式安装早期版本吗?我如何使用如下代码解决此问题?

import pandas_datareader as web
import datetime

co = web.DataReader("AAPL", "yahoo", datetime.date.today() - datetime.timedelta(days=10), datetime.date.today())

print co.head()

只需转到 pandas_datareader 的 PyPi,下载 tar.gz 文件 (wget <url to tar.gz file for 0.5.0>) 并输入 pip install blahblah.tar.gz.

这是我写的package to read from the new api https://query1.finance.yahoo.com

from datetime import datetime
import py_yahoo_prices.price_fetcher as pf


st_dt = datetime(2017, 6, 1)
comp_codes = ["IMM.L", "AAPL", "TSLA", ....]

# get the raw prices from yahoo, auto retries on a 401 error
raw_prices = pf.multi_price_fetch(code=comp_codes, start_date=st_dt)