Skip to content
This repository has been archived by the owner on Jun 5, 2022. It is now read-only.

Latest commit

 

History

History
39 lines (24 loc) · 1006 Bytes

README.md

File metadata and controls

39 lines (24 loc) · 1006 Bytes

ipgeo

!!!IMPORTANT: This repo, with the corresponding PyPI lib, is no longer maintained. ip.taobao.com has been shutdown since 2022.3.31 [1].

PyPI version

Geo info retriever for ipv4 address using chinese taobao service.

Python 2.x/3.x Compatible.

Inspired by huacnlee/ip-location.

Goal

Retrieve geo info for ip address via ip.taobao.com .

Limit

  • The official limit: for every user, qps < 10. ref

Usage

#encoding=utf8

from ipgeo import ipgeo

info = ipgeo.query('182.138.127.93')
print(info.country)      # 中国
print(info.region)       # 四川省
print(info.city)         # 成都市
print(info.full_name())  # 中国四川省成都市

Refer