Commit 67ad05d7 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by ntome

ipapi: Fix Python 3 compatibility

parent eda40bc0
......@@ -37,7 +37,7 @@ class IpapiModule(Module, CapGeolocIp):
BROWSER = Browser
def get_location(self, ipaddr):
res = self.browser.location('http://ip-api.com/json/%s' % ipaddr.encode('utf-8'))
res = self.browser.location(u'http://ip-api.com/json/%s' % ipaddr)
jres = json.loads(res.text)
if "status" in jres and jres["status"] == "fail":
......
......@@ -88,6 +88,7 @@ imgur
indeed
infomaniak
ing
ipapi
ipinfodb
jcvelaux
jirafeau
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment