Skip to main content

Query IP geolocation/ISP via real browser interaction on tool.hiofd.com

Project description

IP-hiofd

通过 https://tool.hiofd.com/ip/ 的真实页面交互查询 IP 信息。

输出字段:

  • 网络服务商
  • 位置(IP归属地)
  • 街道

安装

作为 Python 包安装

pip install ip-hiofd

运行前请安装 Python Playwright 浏览器依赖(无需 Node.js)。

开发环境安装

git clone https://github.com/Qoo-330ml/IP-hiofd
cd IP-hiofd
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python -m playwright install chromium

Python 命令行

ip-hiofd 61.175.188.57
ip-hiofd 61.175.188.57 --json
ip-hiofd 61.175.188.57 --timeout 120 --retries 5 --retry-delay 1.5

Python 作为库调用

from ip_hiofd import HiofdIpClient

client = HiofdIpClient()
result = client.lookup('61.175.188.57')
print(result.isp, result.location, result.district, result.street)

或快捷函数:

from ip_hiofd.client import lookup_ip

result = lookup_ip('117.152.147.151')
print(result)

目录说明

  • ip_hiofd/:Python 包
  • ip_hiofd/client.py:纯 Python Playwright 浏览器自动化实现
  • ip_hiofd_api.py:兼容旧用法的 Python CLI 封装

备注

该站后端接口对直连请求有风控校验(444),本项目采用“真实页面流程自动化”来保证可用性与结果一致性。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ip_hiofd-0.1.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ip_hiofd-0.1.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file ip_hiofd-0.1.2.tar.gz.

File metadata

  • Download URL: ip_hiofd-0.1.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ip_hiofd-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6589291f857db97647e5fed0d64fdc46aae8a3c052a5306f107b71f15807729d
MD5 1aa0deabc8adbafb11dcf37050edc49a
BLAKE2b-256 f49f955a6d7b075159e6a7bc53bd5066ec90b14692d2858d82d4c3e0a62c5be2

See more details on using hashes here.

File details

Details for the file ip_hiofd-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ip_hiofd-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ip_hiofd-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c530914ba90f3785a70120be7a6bf7fd732c0fc628196cfe44291fc1e180f3d7
MD5 e756d2535b542d35594888877a7b99c5
BLAKE2b-256 1d93913ec236aa4334eee50dc87d6088cc6644622bb4eb542c23782250ca3e52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page