Skip to content

Commit

Permalink
Update getProxy.py
Browse files Browse the repository at this point in the history
  • Loading branch information
j0rd1s3rr4n0 committed Jul 20, 2024
1 parent b290b6a commit 0329454
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions proxy/getProxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0329454

Please sign in to comment.