diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..08125b4 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,16 @@ +kind: pipeline +type: docker +name: default + +steps: + - name: run-scheduled-task + image: python:3.10 + commands: + - pip install -r requirements.txt # 如果有依赖 + - python task.py + +trigger: + event: + - cron + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ceb386 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv diff --git a/check-reg-domain.py b/check-reg-domain.py index 8e434f6..7a596a6 100644 --- a/check-reg-domain.py +++ b/check-reg-domain.py @@ -39,7 +39,7 @@ def check_domain_availability(domain_name): except Exception as e: # print(f"域名: {domain_name} 可以注册") - message = f"域名: {domain_name} 可以注册 **" + message = f"域名: {domain_name} 可以注册, {e} **" return message diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..eff02b2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +python-dateutil==2.9.0.post0 +python-whois==0.9.4 +six==1.16.0