python ip查询。
ip-quer的Python项目详细描述
python:ip查询
IP查询,允许代理。
安装
$ pip3 install ip-query
用法
fromip_queryimportip_queryip=ip_query()
结果如下:
{ 'ip': '112.118.6.224', 'country': 'Hong Kong', 'country_code': 'HK', 'asn': 4760, 'aso': 'HKT Limited' }
在socks5代理后面?像这样使用:
fromip_queryimportip_queryip=ip_query(requests_proxies={'http':'socks5://127.0.0.1:1080','https':'socks5://127.0.0.1:1080',},)
谢谢
我们从GeoLite2 Free Downloadable Databases中选择了GeoLite2 Country
和GeoLite2 ASN
。
最新版本:20190312
。
多亏了MaxMind。