add method to get ip information

This commit is contained in:
2024-03-13 23:08:07 +01:00
parent c2707ed005
commit 1579d35c36
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
class IPLocationInfo:
def __init__(self, ip, country, city, isp):
self.ip = ip
self.country = country
self.city = city
self.isp = isp
def __repr__(self):
return "ip:{}, country:{}, city:{}, isp:{}".format(self.ip, self.country, self.city, self.isp)