Conversation
ab75962 to
703f5d4
Compare
|
Can you please check why travis-ci is failing? |
|
I have been working on that. It appears to be an issue with Python3, but I don't know how to fix it yet. I haven't had time to figure this out at the moment. I should be able to this weekend. |
703f5d4 to
2a5dbb0
Compare
|
The current requests library supports proxies and socks. http://docs.python-requests.org/en/master/user/advanced/#proxies |
|
Ok. I will fix it up to use requests[socks] then. Didn't realize they added that. |
2a5dbb0 to
2829970
Compare
|
@tim95030 check your fb messages |
pgoapi/rpc_api.py
Outdated
| try: | ||
| http_response = self._session.post(endpoint, data=request_proto_serialized) | ||
| except requests.exceptions.ConnectionError as e: | ||
| except (requests.exceptions.ConnectionError, requesocks.exceptions.ConnectionError) as e: |
There was a problem hiding this comment.
Mayby throw different exception for proxy error?
Then it could be catched in client and "new" proxy set..
There was a problem hiding this comment.
Fair enough. Also I need to remove the requesocks.exception here since I replaced that library in my latest change.
[Edit]: Upon further inspection I am not sure what I can do here. There is already a raise here that can be caught in an application. I did remove the exception from resquesocks since I removed that library.
2829970 to
88588a2
Compare
|
I think, the authentification should also use the proxy. |
|
@ndurchx What do you mean? All requests use the proxy with this change. You turn on the proxy and all requests use it. If you mean it should support proxies with authentication, then that was not my goal and can be added later separately. |
I added this in a way that nothing is affected unless you define a proxy with PGoApi.set_proxy or by passing in a proxy to the PGoApiRequest method. I defaulted it to None and it uses the standard requests library if it is none.