I am trying to pull Historical data of Indices from Google Finance, but it's not working. While I am able to pull historical data of an individual stock easily. Am I doing something wrong with Indices?
My code for Stock
from pandas_datareader import data
from dateutil.relativedelta import relativedelta
import datetime as dt
enddate = dt.datetime.today()
begdate = enddate + relativedelta(years=-1)
x= data.get_data_google("GOOGL",begdate,enddate)
print(x.head())
Output
Open High Low Close Volume
Date
2016-05-24 719.85 734.20 719.64 733.03 1890195
2016-05-25 735.00 739.89 732.60 738.10 1610773
2016-05-26 736.00 741.10 733.00 736.93 1298295
2016-05-27 737.51 747.91 737.01 747.60 1738913
2016-05-31 748.76 753.48 745.57 748.85 2124248
My code for Index
x= data.get_data_google(".DJI",begdate,enddate)
Error
RemoteDataError: Unable to read URL: http://www.google.com/finance/historical