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.1.tar.gz
(5.3 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.1.tar.gz.
File metadata
- Download URL: ip_hiofd-0.2.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12072b557e3db8c5e0999b7b3dccdd36e06b8041f83ba436e5a730f1316f4069
|
|
| MD5 |
00195599965b1463ed9bbcee88f33025
|
|
| BLAKE2b-256 |
eafbce1baed7516e5bfa60b1b659b145459bbd44fb532798b1eccd64a5d24f29
|
File details
Details for the file ip_hiofd-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ip_hiofd-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.9 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 |
cc5d6f4e0e19646079966e5c0e49d36bae8c55831db6e761cc80a512736cf339
|
|
| MD5 |
a1780cc2ab0118cdbd50978822c9b785
|
|
| BLAKE2b-256 |
010495e85adcca4ac19b630faec364c6d71ecb54bf3a0f980db513f8810d1411
|