预删除域名获取
.cn, .top 预删除的域名获取。
使用方法
1. 安装依赖包:
- 方式一:通过 pypi
pip install predeldomain
- 方式二:通过代码仓库
pip install git+https://framagit.org/idev/predeldomain.git
- 方式三:通过本地仓库
pip install -e .
- 方式四:通过 wheel 包
pip install predeldomain-X.X.X-py3-none-any.whl
2. 使用帮助
» predeldomain --help
usage: predeldomain [-h] [-d [1-30]] [-l [1-10]] [-m {1,2,3}] [-o OUPUT] [-s {cn,top}] [-t {text,json}] [-w WHOIS] [-v]
The domain to be pre-deleted.
options:
-h, --help show this help message and exit
-d [1-30], --delay [1-30]
Delay: 1s to 30s
-l [1-10], --length [1-10]
Length: 1 to 10
-m {1,2,3}, --mode {1,2,3}
Mode: 1. Alphanumeric, 2. Numeric, 3. Alphabetic
-o OUPUT, --ouput OUPUT
Output: print data to stdout
-s {cn,top}, --suffix {cn,top}
Suffix: 'cn' or 'top'
-t {text,json}, --type {text,json}
Save type: 'text' or 'json'
-w WHOIS, --whois WHOIS
Whois: whois, isp, nic, none
-v, --version Print version
- length: 长度,不含后缀
- mode: 模式, 1. 数字 + 字母, 2. 数字, 3. 字母
- suffix: 域名后缀, 'cn' 或者 'top'
- type: 保存类型, 'text' 或者 'json' (数据保存和发送通知的格式)
- whois: whois, isp,查询可用的方式。
留空,则不查询,而是直接根据官网提供的数据判断;whois,则使用whois库查询;isp则使用官方接口(.top)、腾讯云(.cn)的 API 查询。 - version: 版本信息
- delay: 接口查询延时,单位秒,默认为 3
- ouput: 是否输出到控制台,默认为 False
结果将会通过 PUSH 通知,和保存到本地文件。本地文件将会以 后缀_日期.log 的格式保存(_next则是明天及以后预删除的域名)。
3. PUSH 通知
当前仅支持 Lark 以及 PushDeer。依赖 ipush 库,可自行添加其它渠道。
需要设置环境变量
# Lark
export LARK_TOKEN=""
export LARK_SECRET=""
# PushDeer
export PUSHDEER_TOKEN=""
开发
1. 前置开发环境
- 使用 Rye 作为包管理工具
2. 开发流程
- 安装依赖包:
# 同步
rye sync
- 代码检测与格式化:
# 检测
rye run check
# 格式化
rye run format
- 单元测试:
# rye test
rye run tests
# pytest
python -m pytest
# 打印测试报告
python -m pytest -s
仓库镜像
Metadata
Release files for predeldomain 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| predeldomain-0.2.0.tar.gz | 15.3 kB | Without provenance | Details for predeldomain-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| predeldomain-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for predeldomain-0.2.0-py3-none-any.whl |
Total release size: 30.1 kB
Release files / predeldomain-0.2.0.tar.gz
| Download URL | predeldomain-0.2.0.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27177a442620c9bc2584c74b86e65c82f6994b7e0bacf1f39066a87ead61d753
|
|
BLAKE2b-256 checksum How to use checksums |
8e776f25002008a722abaf75bbb88f11b40750b9fb277247d30883da241210bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / predeldomain-0.2.0-py3-none-any.whl
| Download URL | predeldomain-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b05c7404df26b8b78128f087f10c16cc829cd7db245784f5164e90144f7bdbb2
|
|
BLAKE2b-256 checksum How to use checksums |
6c91a23bfa604d4a4721ba3925ee32872990c58a33df4248745a77767ea3504f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Security for predeldomain 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.