Skip to content
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

tryfix urllib2 https handshake timeout #197

Closed
wants to merge 1 commit into from

Conversation

mediaminister
Copy link
Collaborator

tryfix #191

@@ -75,7 +75,8 @@ def get_cookie_from_cookiejar(cookiename, cookiejar):

def _get_new_playertoken(self, path, token_url, headers):
import json
req = Request(token_url, data='', headers=headers)
req = Request(token_url, headers=headers)
req.get_method = lambda: 'POST'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No offence, but that looks... strange. Why the lambda function here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because get_method is a function and a string is not callable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see, what a weird interface.

@dagwieers dagwieers added the bug Something isn't working label May 10, 2019
@dagwieers dagwieers added this to the v1.10.0 milestone May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants