预删除域名查询
Project description
预删除域名获取
.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
仓库镜像
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
predeldomain-0.2.0.tar.gz
(15.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 predeldomain-0.2.0.tar.gz.
File metadata
- Download URL: predeldomain-0.2.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27177a442620c9bc2584c74b86e65c82f6994b7e0bacf1f39066a87ead61d753
|
|
| MD5 |
31e8a8ca93ee41de723b9d6df534724f
|
|
| BLAKE2b-256 |
8e776f25002008a722abaf75bbb88f11b40750b9fb277247d30883da241210bb
|
File details
Details for the file predeldomain-0.2.0-py3-none-any.whl.
File metadata
- Download URL: predeldomain-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b05c7404df26b8b78128f087f10c16cc829cd7db245784f5164e90144f7bdbb2
|
|
| MD5 |
bbf965db2574a47b9914eb4d161cf37f
|
|
| BLAKE2b-256 |
6c91a23bfa604d4a4721ba3925ee32872990c58a33df4248745a77767ea3504f
|