根据IP查地理位置信息

 

IP地址库下载地址:

https://www.ipip.net/product/ip.html

 

使用方式(Python):

https://github.com/ipipdotnet/datx-python

 

import datx

c = datx.City("ipdata_new.datx")
ip = '183.156.1.109'

print(c.find(ip))

 输出结果:

['中国', '浙江', '杭州', '']

 

谢谢!

posted @ 2018-08-01 17:59  宝山方圆  阅读(345)  评论(0编辑  收藏  举报