mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
优化
This commit is contained in:
+3
-1
@@ -266,7 +266,9 @@ class IpRegData(IpRegInfo):
|
||||
else:
|
||||
result = self.btree_search(ip)
|
||||
addr_list = result.get('region').split('|')
|
||||
isp = addr_list[-1]
|
||||
addr = ''.join(filter(lambda x: x != '0', addr_list[:-1]))
|
||||
isp = addr_list[-1]
|
||||
if isp == '0':
|
||||
isp = '未知'
|
||||
info = {'addr': addr, 'isp': isp}
|
||||
return info
|
||||
|
||||
Reference in New Issue
Block a user