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

Conversation

buefox
Copy link
Contributor
@buefox buefox commented Aug 27, 2015

It used to be the format like:
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
However, it seems to be changed to :
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

It worked for me, and I wish you all giving some feedback to my first pull request!
Thanks

@buefox
Copy link
Contributor Author
buefox commented Aug 27, 2015

@tacaswell I am confused by the build#8187.6 of Travis CI. How can I fix this? It seems that it didn't have 'doc/build/html/index.html' after building. Thanks.

@WeatherGod
Copy link
Member

Hmm, some sort of issue importing the ipython console highlighting extension for doc-builds. Might be transient, so I restarted the build.

@buefox
Copy link
Contributor Author
buefox commented Aug 27, 2015

@WeatherGod Thanks. But it seems to be failed again (facepalm

@WeatherGod
Copy link
Member

same error. It can't get the console highlighting imported. strange...

@buefox
Copy link
Contributor Author
buefox commented Aug 27, 2015

@WeatherGod Is there anything I should fix?

@WeatherGod
Copy link
Member

It doesn't look like you broke anything. I am just going to wait a bit and
see if the problem resolves itself, or if another dev has an idea what is
happening.

On Thu, Aug 27, 2015 at 10:53 AM, buefox notifications@github.com wrote:

@WeatherGod https://github.com/WeatherGod Is there anything I should
fix?


Reply to this email directly or view it on GitHub
#4997 (comment)
.

@tacaswell
Copy link
Member

This might be side effects of the giant ipython refractor

On Thu, Aug 27, 2015, 10:56 AM Benjamin Root notifications@github.com
wrote:

It doesn't look like you broke anything. I am just going to wait a bit and
see if the problem resolves itself, or if another dev has an idea what is
happening.

On Thu, Aug 27, 2015 at 10:53 AM, buefox notifications@github.com wrote:

@WeatherGod https://github.com/WeatherGod Is there anything I should
fix?


Reply to this email directly or view it on GitHub
<
https://github.com/matplotlib/matplotlib/pull/4997#issuecomment-135458687>
.


Reply to this email directly or view it on GitHub
#4997 (comment)
.

@buefox
Copy link
Contributor Author
buefox commented Aug 28, 2015

@WeatherGod Is there anything I can do?

@tacaswell
Copy link
Member

@buefox Can you squash this all down to one commit? I don't normally ask people to squash, but it looks like there was some serious thrashing in those commits that are +300, then -300 and the net change is +4/-3.

@buefox
Copy link
Contributor Author
buefox commented Aug 29, 2015

@tacaswell I squashed all the commits into one. In the first commit I put the wrong file(from an old version matplot lib) so it has huge difference. And the following commits I fixed the code to comply PEP8.

@tacaswell
Copy link
Member

You will need to (re)squash and then a force-push to your master. It looks like you squashed (good) and then merged your commits from github back in so now we have your changes in the history twice (once squashed, once an the 5 commits). Have a look at gitk, I find that always helps me make sense of git.

That makes sense for the size of those changes.

@buefox
Copy link
Contributor Author
buefox commented Sep 1, 2015

@tacaswell Thank you very much! I fixed it but the Travis CI build is still failed.

@tacaswell
Copy link
Member

I kicked the job to restart. It is dying on building the docs on https://github.com/matplotlib/matplotlib/blob/master/examples/pylab_examples/date_demo2.py which uses this function. Can you check that that example still runs for you locally?

@buefox
Copy link
Contributor Author
buefox commented Sep 1, 2015

@tacaswell it still runs but occurs runtime error of exceeding maximum ticks

RuntimeError: RRuleLocator estimated to generate 4291 ticks from 2003-12-01 00:00:00+00:00 to 2015-08-31 00:00:00+00:00: exceeds Locator.MAXTICKS * 2 (2000)

@tacaswell
Copy link
Member

Did something change about the returned historical data?

@buefox
Copy link
Contributor Author
buefox commented Sep 1, 2015

@tacaswell Ohhh yes it returned completely different data..... not even out of the given range and wrong data

@buefox
Copy link
Contributor Author
buefox commented Sep 1, 2015

@tacaswell I fixed the major mistake of this. The file running on my local side is not consistent with the file I committed. I have fixed the missing '&'s of the URL and the checks and the example runs correctly. Thanks a lot for your assistance and help, I appreciate them and learn a lot.

@tacaswell tacaswell added this to the proposed next point release milestone Sep 1, 2015
@dstansby
Copy link
Member

Looks like this is ready to go!

@tacaswell tacaswell closed this Jan 14, 2017
@tacaswell tacaswell reopened this Jan 14, 2017
@tacaswell
Copy link
Member

power-cycled to re-run against the current master.

@buefox Sorry this sat for so long with out any attention!

@codecov-io
Copy link

Current coverage is 62.09% (diff: 0.00%)

No coverage report found for master at 3122457.

Powered by Codecov. Last update 3122457...de46378

@buefox
Copy link
Contributor Author
buefox commented Jan 15, 2017

@tacaswell thanks a lot for all the attention! Thought it had been abandoned!

@tacaswell
Copy link
Member

I assure you it was not intentional, things sometimes fall through the cracks 😞 .

@tacaswell
Copy link
Member

Is there any documentation on where/why this changed? The current url still seems to work (but this URL also works).

@buefox
Copy link
Contributor Author
buefox commented Jan 15, 2017

@tacaswell The current url was not avaliable last year when I opened this PR. Yahoo's finance service somehow changed the url for data fetching at that time. At the moment when the original url failed t work I get to the https://finance.yahoo.com/quote/AAPL/history?p=AAPL to find out valid url to get historical data. Then I got this url working. I'll look for further difference between these two urls.

@tacaswell
Copy link
Member

Attempting to google this, all I found were blog-posts with the old url, I wonder if they got enough complaints they put it back, despite it being fully undocumented 😜 .

@tacaswell tacaswell changed the title The url of downloading historical prices of Yahoo Finance has changed [MRG+1] The url of downloading historical prices of Yahoo Finance has changed Jan 15, 2017
@buefox
Copy link
Contributor Author
buefox commented Jan 15, 2017

Since Yahoo apis are closed and these implicit urls are not officially announced by Yahoo, it is hard to tell. There are only few posts using real-chart url. Thanks again for the support and recalling me about the time having fun with stock data and matplotlib :D

@NelleV
Copy link
Member
NelleV commented Jan 29, 2017

The finance module has been deprecated. This patch should go into mpl-finance instead of matplotlib.

@dstansby
Copy link
Member

Since the fix is here, and there's no reason not to merge it I'll merge it anyway. matplotlib/mpl-finance#4 is an issue to put the change in mpl-finance.

@dstansby dstansby merged commit bf9aef6 into matplotlib:master Feb 12, 2017
@dstansby dstansby changed the title [MRG+1] The url of downloading historical prices of Yahoo Finance has changed The url of downloading historical prices of Yahoo Finance has changed Feb 12, 2017
tacaswell added a commit to tacaswell/mpl_finance that referenced this pull request Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0