From 032945485bdd5ac4698e4ac440f30c03f16af8f3 Mon Sep 17 00:00:00 2001 From: Jordi Serrano <44474715+j0rd1s3rr4n0@users.noreply.github.com> Date: Sun, 21 Jul 2024 00:10:43 +0200 Subject: [PATCH] Update getProxy.py --- proxy/getProxy.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/proxy/getProxy.py b/proxy/getProxy.py index 13f8dc2d..21c510d4 100644 --- a/proxy/getProxy.py +++ b/proxy/getProxy.py @@ -249,14 +249,13 @@ def realizar_solicitudes_concurrentes(max_intentos=2): warnings.filterwarnings("ignore", category=InsecureRequestWarning) # Geolocate Proxy - geo = requests.get(f"http://freeipapi.com/api/json/{proxy.split(':')[0]}", timeout=2, verify=False) - if(geo.status_code == 200): - geo = geo.json() - # Check if the proxy is Up and print the country, region and city - try: - response = requests.get("http://httpbin.org/ip", proxies={"http": f"http://{proxy}","https": f"https://{proxy}"}, timeout=1, verify=False) - except Exception: - pass + # geo = requests.get(f"http://freeipapi.com/api/json/{proxy.split(':')[0]}", timeout=2, verify=False) + # if(geo.status_code == 200): + # geo = geo.json() + # # Check if the proxy is Up and print the country, region and city + # try: + # response = requests.get("http://httpbin.org/ip", proxies={"http": f"http://{proxy}","https": f"https://{proxy}"}, timeout=1, verify=False) + # except: try: geo_response = None