-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
@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. |
Hmm, some sort of issue importing the ipython console highlighting extension for doc-builds. Might be transient, so I restarted the build. |
@WeatherGod Thanks. But it seems to be failed again (facepalm |
same error. It can't get the console highlighting imported. strange... |
@WeatherGod Is there anything I should fix? |
It doesn't look like you broke anything. I am just going to wait a bit and On Thu, Aug 27, 2015 at 10:53 AM, buefox notifications@github.com wrote:
|
This might be side effects of the giant ipython refractor On Thu, Aug 27, 2015, 10:56 AM Benjamin Root notifications@github.com
|
@WeatherGod Is there anything I can do? |
@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. |
@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. |
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. |
556fe07
to
6325e6e
Compare
@tacaswell Thank you very much! I fixed it but the Travis CI build is still failed. |
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? |
@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) |
Did something change about the returned historical data? |
@tacaswell Ohhh yes it returned completely different data..... not even out of the given range and wrong data |
@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. |
Looks like this is ready to go! |
power-cycled to re-run against the current master. @buefox Sorry this sat for so long with out any attention! |
Current coverage is 62.09% (diff: 0.00%)
|
@tacaswell thanks a lot for all the attention! Thought it had been abandoned! |
I assure you it was not intentional, things sometimes fall through the cracks 😞 . |
Is there any documentation on where/why this changed? The current url still seems to work (but this URL also works). |
@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. |
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 😜 . |
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 |
The finance module has been deprecated. This patch should go into mpl-finance instead of matplotlib. |
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. |
This is a port of matplotlib/matplotlib#4997 closes matplotlib#4
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