Skip to content

Update Yahoo _get_crumb #358

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

Closed
wants to merge 1 commit into from
Closed

Update Yahoo _get_crumb #358

wants to merge 1 commit into from

Conversation

gliptak
Copy link
Contributor

@gliptak gliptak commented Jul 4, 2017

Signed-off-by: Gábor Lipták [email protected]

This is intended to correct the intermittent crumb error.

https://travis-ci.org/gliptak/pandas-datareader/builds/250129519

#356

Signed-off-by: Gábor Lipták <[email protected]>
@jreback
Copy link
Contributor

jreback commented Jul 4, 2017

if this passes, can you try removing the xfails and push again as I suggest #356 (comment)

@gliptak
Copy link
Contributor Author

gliptak commented Jul 4, 2017

@jreback I don't see this correcting the SPLIT and 251/252 failures (from #356 (comment))

@jreback
Copy link
Contributor

jreback commented Jul 4, 2017

@gliptak ok this looks fine. what is it intended to solve? just an intermittent error?

@jreback jreback added the testing label Jul 4, 2017
@jreback jreback added this to the 0.5.0 milestone Jul 4, 2017
@gliptak
Copy link
Contributor Author

gliptak commented Jul 4, 2017

I'm seeing exceptions like below, but I just noticed that the above change doesn't correct them (although it simplifies the code)

/pandas/local/lib/python2.7/site-packages/pandas_datareader/base.pyc in _get_response(self, url, params, headers)
    140         if params is not None and len(params) > 0:
    141             url = url + "?" + urlencode(params)
--> 142         raise RemoteDataError('Unable to read URL: {0}'.format(url))
    143 
    144     def _get_crumb(self, *args):

RemoteDataError: Unable to read URL: https://query1.finance.yahoo.com/v7/finance/download/AAPL?crumb=HrMgz4DEURf&interval=1d&period2=1499208155&events=div&period1=1262322000

The URL content is:

{
    "finance": {
        "error": {
            "code": "Unauthorized",
            "description": "Invalid cookie"
        }
    }
}

@gliptak gliptak closed this Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants