Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f47c69e

Browse files
buefoxtacaswell
authored andcommitted
MNT: update yahoo finance url
1 parent eb42cfc commit f47c69e

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

lib/matplotlib/finance.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,10 @@ def fetch_historical_yahoo(ticker, date1, date2, cachename=None,
338338
else:
339339
g = 'd'
340340

341-
urlFmt = ('http://ichart.yahoo.com/table.csv?a=%d&b=%d&' +
342-
'c=%d&d=%d&e=%d&f=%d&s=%s&y=0&g=%s&ignore=.csv')
343-
344-
url = urlFmt % (d1[0], d1[1], d1[2],
345-
d2[0], d2[1], d2[2], ticker, g)
341+
urlFmt = ('http://real-chart.finance.yahoo.com/table.csv?' +
342+
's=%s&d=%d&e=%df=%d&g=%s&a=%d&b=%d&c=%d&ignore=.csv')
346343

344+
url = urlFmt % (ticker, d2[0], d2[1], d2[2], g, d1[0], d1[1], d1[2])
347345
# Cache the finance data if cachename is supplied, or there is a writable
348346
# cache directory.
349347
if cachename is None and cachedir is not None:

0 commit comments

Comments
 (0)