From 35a35a56e2598a45ab0752d4225e8c33686b583f Mon Sep 17 00:00:00 2001 From: Gregory Danielson Date: Sun, 1 Nov 2020 13:40:20 -0600 Subject: [PATCH] Capture region from ip2location lookup --- lib/location.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/location.py b/lib/location.py index d555a44..794a5f8 100644 --- a/lib/location.py +++ b/lib/location.py @@ -133,9 +133,10 @@ def ip2location(ip_addr): if location and ';' in location: ipcachewrite(ip_addr, location) - location = location.split(';')[3], location.split(';')[1] + _, country, region, city = location.split(';') + location = city, region, country else: - location = location, None + location = location, None, None return location