Closed imamdigmi closed 4 years ago
@imamdigmi It would seem that the problem is with the way proxies are being passed to requests.request function in requestProxy.py file. Parameter proxies in requests.request function must be a dictionary of the following form: "protocol:port": "URL of the proxy (IP works too)". Changing line from this:
proxies={"http": self.current_proxy.get_address(), "https": self.current_proxy.get_address()}
to this:
proxies={"http:{}".format(self.current_proxy.port): self.current_proxy.get_address(), "https:{}".format(self.current_proxy.port): self.current_proxy.get_address()}
seem to fix the problem. I don't know how correct this solution is though.
EDIT: above solution only hides the problem, turns out that requests not being sent through proxy. Here is the solution that use proxies:
proxies={"http": "http://"+self.current_proxy.get_address(), "https": "https://"+self.current_proxy.get_address()}
Fixed as part of #60
Hey Pgaref! your work looks great! I am very interested in trying this package as an API Library, I just started by installing it via PIP and trying to snippet that you wrote in Readme, but I have problems about it, below is the code I use
And I got these error message
how can i solve this problem? thank you!