import re, requests, uuid
GATE = "gate.aeonproxy.com:7000"
# Country key only. Fijian shops write prices as "$ 529.00", "109.00 FJD" or "from FJ$185".
# Shelf prices include VAT: 12.5% since 1 August 2025, tax fraction 1/9 (FRCS).
NETWORK = {"AS38442": "Vodafone Fiji", "AS45355": "Digicel Fiji", "AS4638": "Telecom Fiji"}
PRICE = re.compile(r"(?:FJ)?\$\s?([\d,]+(?:\.\d\d)?)|([\d,]+(?:\.\d\d)?)\s?FJD")
def fijian_exit(tries=8):
for _ in range(tries):
sid = uuid.uuid4().hex[:8]
proxy = f"http://ap_a1b2c3-cc-fj-sid-{sid}-time-1800:PASS@{GATE}"
try:
geo = requests.get("https://ipinfo.io/json", proxies={"http": proxy, "https": proxy}, timeout=15).json()
except requests.RequestException:
continue # no answer: open a new session
if geo.get("country") == "FJ":
geo["network"] = NETWORK.get(geo.get("org", "").split(" ")[0], geo.get("org"))
return proxy, geo # this exit stays for 30 minutes
return None, None
def net_fjd(text):
m = PRICE.search(text)
gross = float((m.group(1) or m.group(2)).replace(",", ""))
return round(gross * 8 / 9, 2) # takes out 12.5% VAT
proxy, geo = fijian_exit()
if proxy:
print(geo["ip"], geo.get("city"), geo["network"])
print(net_fjd("$ 529.00"), net_fjd("109.00 FJD"), net_fjd("from FJ$185")) # 470.22 96.89 164.44
Skip net_fjd for zero-rated goods, which carry no VAT.