Skip to main content

预删除域名查询

Project description

预删除域名获取

.cn, .top 预删除的域名获取。

Package version Supported Python versions

使用方法

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
  1. length: 长度,不含后缀
  2. mode: 模式, 1. 数字 + 字母, 2. 数字, 3. 字母
  3. suffix: 域名后缀, 'cn' 或者 'top'
  4. type: 保存类型, 'text' 或者 'json' (数据保存和发送通知的格式)
  5. whois: whois, isp,查询可用的方式。留空,则不查询,而是直接根据官网提供的数据判断;whois,则使用 whois 库查询;isp 则使用官方接口(.top)、腾讯云(.cn)的 API 查询。
  6. version: 版本信息
  7. delay: 接口查询延时,单位秒,默认为 3
  8. ouput: 是否输出到控制台,默认为 False

结果将会通过 PUSH 通知,和保存到本地文件。本地文件将会以 后缀_日期.log 的格式保存(_next则是明天及以后预删除的域名)。

3. PUSH 通知

当前仅支持 Lark 以及 PushDeer。依赖 ipush 库,可自行添加其它渠道。

需要设置环境变量

# Lark
export LARK_TOKEN=""
export LARK_SECRET=""

# PushDeer
export PUSHDEER_TOKEN=""

开发

1. 前置开发环境

  1. 使用 Rye 作为包管理工具

2. 开发流程

  1. 安装依赖包:
# 同步
rye sync
  1. 代码检测与格式化:
# 检测
rye run check

# 格式化
rye run format
  1. 单元测试:
# rye test
rye run tests

# pytest
python -m pytest

# 打印测试报告
python -m pytest -s

仓库镜像

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

predeldomain-0.2.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

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

predeldomain-0.2.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

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

Hashes for predeldomain-0.2.0.tar.gz
Algorithm Hash digest
SHA256 27177a442620c9bc2584c74b86e65c82f6994b7e0bacf1f39066a87ead61d753
MD5 31e8a8ca93ee41de723b9d6df534724f
BLAKE2b-256 8e776f25002008a722abaf75bbb88f11b40750b9fb277247d30883da241210bb

See more details on using hashes here.

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

Hashes for predeldomain-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b05c7404df26b8b78128f087f10c16cc829cd7db245784f5164e90144f7bdbb2
MD5 bbf965db2574a47b9914eb4d161cf37f
BLAKE2b-256 6c91a23bfa604d4a4721ba3925ee32872990c58a33df4248745a77767ea3504f

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