DataReader google finance date not working

前端 未结 3 1067
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-06 15:24

I was just using pandas datareader to get the stock data for the past two weeks or so and it was working fine. All of a sudden since yesterday the date provided wasnt worki

3条回答
  •  礼貌的吻别
    2021-01-06 16:21

    Google has changed the Google Finance URL to finance.google.com/finance/historical rather than www.google.com/finance/historical, which is used as the URL in the pandas_datareader.

    Server returns HTTP 302 when fetching data from the old URL and redirect to the new URL. However, the parameters startdate/enddate are missing during the HTTP redirection.

    The url is set in the source code: https://github.com/pydata/pandas-datareader/blob/master/pandas_datareader/google/daily.py

    Maybe you can modify the URL and use your own version of pandas_datareader.

提交回复
热议问题