Query IP geolocation/ISP via direct requests to toola.hiofd.com (no browser dependency)
Project description
IP-hiofd
通过 https://toola.hiofd.com/router/rest 直连查询 IP 信息(纯 requests 版本,不依赖浏览器)。
输出字段:
- 网络服务商
- 位置(IP归属地)
- 区
- 街道
安装
作为 Python 包安装
pip install ip-hiofd
开发环境安装
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 命令行
ip-hiofd 61.175.188.57
ip-hiofd 61.175.188.57 --json
ip-hiofd 61.175.188.57 --timeout 30 --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:纯 requests 实现ip_hiofd_api.py:兼容旧用法的 Python CLI 封装
说明
- 本版本已去除 Playwright/Chromium 依赖。
- 请求参数
k/t/x/r由本地算法生成并直连查询。 - 若目标站风控策略调整,建议升级版本或临时回退浏览器自动化方案。
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.2.0.tar.gz
(5.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ip_hiofd-0.2.0.tar.gz.
File metadata
- Download URL: ip_hiofd-0.2.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccfa7c882c91fe70e7842162181503ca3a1fe3d1bc0d39edcd6de3af31338af1
|
|
| MD5 |
be2388225b5e663361c9531b2098693d
|
|
| BLAKE2b-256 |
4af541b38d4abc645619ea88226bd7c41b8aa752564221ffa393183965fdc92b
|
File details
Details for the file ip_hiofd-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ip_hiofd-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48bc9061353c51ae9c0dbb154b53a8186ef12855c87cf65a547ccc1e0ad1b5c3
|
|
| MD5 |
93568c2942f84858cbd930a4d04d0695
|
|
| BLAKE2b-256 |
fc6ca583fec4b420e0bc4234210ead8062745f937a267243d167852a5139eb2a
|