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

Merged
merged 2 commits into from Feb 12, 2017

Conversation

Projects
None yet
6 participants
Contributor

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

Contributor

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.

Member

WeatherGod commented Aug 27, 2015

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

Contributor

buefox commented Aug 27, 2015

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

Member

WeatherGod commented Aug 27, 2015

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

Contributor

buefox commented Aug 27, 2015

@WeatherGod Is there anything I should fix?

Member

WeatherGod commented Aug 27, 2015

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)
.

Owner

tacaswell commented Aug 27, 2015

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)
.

Contributor

buefox commented Aug 28, 2015

@WeatherGod Is there anything I can do?

Owner

tacaswell commented Aug 29, 2015

@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.

Contributor

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.

Owner

tacaswell commented Aug 29, 2015

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 closed this Aug 29, 2015

tacaswell removed the needs_review label Aug 29, 2015

buefox reopened this Aug 29, 2015

buefox closed this Aug 29, 2015

tacaswell removed the needs_review label Aug 29, 2015

buefox reopened this Aug 29, 2015

Contributor

buefox commented Aug 29, 2015

@tacaswell Sorry I rewind too far away while I am squashing all the commits. I think I screw it :(. I am still no familiar with git. How can I fix this situation?

Owner

tacaswell commented Aug 29, 2015

ok, so I think I have fixed it up for you, see the branch https://github.com/tacaswell/matplotlib/tree/buefox_rebase on my repo.

To fix this up on your end:

git remote add tacaswell https://github.com/tacaswell/matplotlib
git remote update
git checkout master
git reset --hard tacaswell/buefox_rebase
git push --force buefox master:master

where buefox is the name of remote that points at your gh public repo for matplotlib. This should make your local (on your machine) master branch match my buefox_rebase branch which has just your changes on it and then makes the master branch on your public gh repo the same. Any other changes you can simply commit and not force push to gh.

In general, it is best to put in pull requests off of feature branches (that is any branch not named 'master').

Contributor

buefox commented Sep 1, 2015

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

Owner

tacaswell commented Sep 1, 2015

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?

Contributor

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)

Owner

tacaswell commented Sep 1, 2015

Did something change about the returned historical data?

Contributor

buefox commented Sep 1, 2015

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

@buefox buefox added missing '&'s (stupid mistake)
de46378
Contributor

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 added this to the proposed next point release milestone Sep 1, 2015

Contributor

dstansby commented Jan 14, 2017

Looks like this is ready to go!

tacaswell closed this Jan 14, 2017

tacaswell reopened this Jan 14, 2017

Owner

tacaswell commented Jan 14, 2017

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

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

tacaswell referenced this pull request in matplotlib/mpl_finance Jan 14, 2017

Open

port yahoo url fix #4

Current coverage is 62.09% (diff: 0.00%)

No coverage report found for master at 3122457.

Powered by Codecov. Last update 3122457...de46378

Contributor

buefox commented Jan 15, 2017

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

Owner

tacaswell commented Jan 15, 2017

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

Owner

tacaswell commented Jan 15, 2017

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

Contributor

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.

Owner

tacaswell commented Jan 15, 2017

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 changed the title from The url of downloading historical prices of Yahoo Finance has changed to [MRG+1] The url of downloading historical prices of Yahoo Finance has changed Jan 15, 2017

Contributor

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

Contributor

NelleV commented Jan 29, 2017

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

Contributor

dstansby commented Feb 12, 2017

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

3 of 4 checks passed

codecov/patch 0.00% of diff hit (target 62.09%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 62.098%
Details

dstansby changed the title from [MRG+1] The url of downloading historical prices of Yahoo Finance has changed to The url of downloading historical prices of Yahoo Finance has changed Feb 12, 2017

dstansby removed the needs_review label Feb 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment