V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
q770787217
V2EX  ›  Python

Win7 怎么使用 Python + ip2region 批量查询 IP 归属地?

  •  
  •   q770787217 · 2018-06-04 14:05:49 +08:00 · 2233 次点击
    这是一个创建于 2147 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Win7 怎么使用 Python + ip2region 批量查询 IP 归属地?
    根据这个教程 http://blog.51cto.com/wujianwei/2123493
    摸索了一天 也搞不懂,教材使用的是 centos 我在 Win 7 上测试
    有没有现成的或成品的 Python + ip2region 批量查询 IP 归属地 并且生成 CSV
    我在 Win 7 已经搭建了 Python3h 和 JAVA 环境。

    ip2region
    https://github.com/lionsoul2014/ip2region
    2 条回复    2018-06-04 22:54:18 +08:00
    shuianfendi6
        1
    shuianfendi6  
       2018-06-04 17:30:12 +08:00
    直接下 ipip dat 或者 geolite 的数据转 csv
    用个 treemap 或者二分查找 ip 段
    q770787217
        2
    q770787217  
    OP
       2018-06-04 22:54:18 +08:00
    @shuianfendi6 不会用 treemap 二分查找法接口慢 数据不准确
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2876 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 09:28 · PVG 17:28 · LAX 02:28 · JFK 05:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.