8000 Merge pull request #4997 from buefox/master · matplotlib/matplotlib@bf9aef6 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf9aef6

Browse files
authored
Merge pull request #4997 from buefox/master
[MRG+1] The url of downloading historical prices of Yahoo Finance has changed
2 parents 3d99e43 + de46378 commit bf9aef6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/matplotlib/finance.py

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

345-
urlFmt = ('http://ichart.yahoo.com/table.csv?a=%d&b=%d&' +
346-
'c=%d&d=%d&e=%d&f=%d&s=%s&y=0&g=%s&ignore=.csv')
347-
348-
url = urlFmt % (d1[0], d1[1], d1[2],
349-
d2[0], d2[1], d2[2], ticker, g)
345+
urlFmt = ('http://real-chart.finance.yahoo.com/table.csv?' +
346+
'&s=%s&d=%d&e=%d&f=%d&g=%s&a=%d&b=%d&c=%d&ignore=.csv')
350347

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

0 commit comments

Comments
 (0)
0