proxy-checker-python
proxy-checker-python copied to clipboard
incorrectly report 'Transparent'
Great tool, thank you!
Recently, I've often been getting a timeout from https://api.ipify.org/ -- the proxy-checker incorrectly reports the anonymity as Transparent when that is the case. From the send_query code:
try:
c.perform()
except Exception as e:
# print(e)
return False
# Return False if the status is not 200
if c.getinfo(c.HTTP_CODE) != 200:
return False
Thus when https://api.ipify.org returns an error code, the returned value from send_query is False
r = self.send_query(url='https://api.ipify.org/')
if not r:
return ""
This results in self.ip being set to an empty string, and later:
if self.ip in r:
return 'Transparent'
When an empty string is inevitably found in the response from the proxy judge, the anonymity is incorrectly set to transparent
Thanks for the report! I'll add more IP APIs in case something happens to Ipify and resend requests to make sure the IP is always obtained.