import requests, uuid
GATE = "gate.aeonproxy.com:7000"
# Country key only. Telecel lines still answer as AS327769 "Spacetel - Guine-Bissau",
# and two other countries have Guinea in their name, so compare the country code exactly.
NET = {"AS327769": "Telecel", "AS37559": "Orange Bissau"}
FCFA_PER_EURO = 655.957 # the fixed BCEAO rate
def bissau_exit(tries=15):
for _ in range(tries):
login = f"ap_a1b2c3-cc-gw-sid-{uuid.uuid4().hex[:8]}-time-1200"
proxy = f"http://{login}:PASS@{GATE}"
try:
info = requests.get("https://ipinfo.io/json", proxies={"http": proxy, "https": proxy}, timeout=20).json()
except requests.RequestException:
continue # timed out: try another session
if info.get("country") != "GW":
continue # outside Guinea-Bissau: skip it
asn = info.get("org", "").split(" ")[0]
return proxy, NET.get(asn, info.get("org")), info.get("city")
return None, None, None # none free in this run: try again later
def in_euros(fcfa):
return round(fcfa / FCFA_PER_EURO, 2)
proxy, network, town = bissau_exit()
if proxy:
print(network, town, in_euros(10000))
In a pool of this size a run can end with no exit, so the function may return nothing; wait and call it again. Session length runs from 60 to 21600 seconds, and dropping -sid- rotates the address. ISP and carrier keys are for US, UK and German logins.