FIX? Use ISO8601 dates and resolved URL for Google Finance
@@ -108,13 +108,13 @@ def quotes_historical_google(symbol, start_date, end_date,
The columns are ``date`` -- date, ``open``, ``high``,
``low``, ``close`` and ``volume`` of type float.
"""
- params = urlencode({
+ params = {
'q': symbol,
- 'startdate': start_date.strftime('%b %d, %Y'),
- 'enddate': end_date.strftime('%b %d, %Y'),
- 'output': 'csv'
- })
- url = 'http://www.google.com/finance/historical?' + params
+ 'startdate': start_date.strftime('%Y-%m-%d'),
+ 'enddate': end_date.strftime('%Y-%m-%d'),
+ 'output': 'csv',
+ }
+ url = 'https://finance.google.com/finance/historical?' + urlencode(params)
response = urlopen(url)
dtype = {
'names': ['date', 'open', 'high', 'low', 'close', 'volume'],
