try to use curl_cffi
This commit is contained in:
+12
-12
@@ -6,18 +6,18 @@ from proxy_manager.proxy_manager import ProxyManager
|
||||
|
||||
|
||||
def get_address_ip(proxy_to_use):
|
||||
return ""
|
||||
# try:
|
||||
# response = requests.get(url="https://api.ipify.org", proxies=proxy_to_use, verify=False,
|
||||
# timeout=15)
|
||||
# print(response.status_code)
|
||||
# if response.status_code == 200:
|
||||
# return response.text
|
||||
# else:
|
||||
# return ""
|
||||
# except Exception as Error:
|
||||
# print(Error)
|
||||
# return "error"
|
||||
# return ""
|
||||
try:
|
||||
response = requests.get(url="https://api.ipify.org", proxies=proxy_to_use, verify=False,
|
||||
timeout=15)
|
||||
print(response.status_code)
|
||||
if response.status_code == 200:
|
||||
return response.text
|
||||
else:
|
||||
return ""
|
||||
except Exception as Error:
|
||||
print(Error)
|
||||
return "error"
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user