8000 The url of downloading historical prices of Yahoo Finance has changed by buefox · Pull Request #4997 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

The url of downloading historical prices of Yahoo Finance has changed #4997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions lib/matplotlib/finance.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,10 @@ def fetch_historical_yahoo(ticker, date1, date2, cachename=None,
else:
g = 'd'

urlFmt = ('http://ichart.yahoo.com/table.csv?a=%d&b=%d&' +
'c=%d&d=%d&e=%d&f=%d&s=%s&y=0&g=%s&ignore=.csv')

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

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