From d6c0d87f0a2ef3ea4cea2bda30468f806286a7f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E5=BC=A6?= Date: Tue, 11 Oct 2022 14:16:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=9D=92=E9=BE=99?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E4=B8=BB=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ql_main.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ql_main.py diff --git a/ql_main.py b/ql_main.py new file mode 100644 index 0000000..e293d1b --- /dev/null +++ b/ql_main.py @@ -0,0 +1,17 @@ +""" +new Env('米游社'); +""" +import notify +from loghelper import log +from error import CookieError +from main import main + +if __name__ == "__main__": + try: + status_code, message = main() + except CookieError: + status_code = 1 + message = "账号Cookie出错!" + log.error("账号Cookie有问题!") + notify.send("米游社", message) + From a96ed47d68ac0bc85fe36e516ed5be9d44a3289f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E5=BC=A6?= Date: Tue, 11 Oct 2022 17:50:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/README.md b/README.md index 35ff489..c7fec14 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,54 @@ docker-compose pull && docker-compose up -d 2. 点击`测试函数` 7. 完成 +## 使用青龙面板运行(V2.12+) + +### 1.拉取仓库 + +方式1:订阅管理 + +``` +名称:米游社签到 +类型:公开仓库 +链接:https://github.com/Womsxd/AutoMihoyoBBS.git +定时类型:crontab +定时规则:2 2 28 * * +白名单:ql_main.py +依赖文件:error|mihoyo|genshin|honkai3rd|log|push|req|set|tools|con|acc|honkai2|tearsofthemis|captcha|main +``` + +方式2:指令拉取 + +```sh +ql repo https://github.com/Womsxd/AutoMihoyoBBS.git "ql_main.py" "" "error|mihoyo|genshin|honkai3rd|log|push|req|set|tools|con|acc|honkai2|tearsofthemis|captcha|main" +``` + +### 2.环境变量添加 + +在config.sh中添加 + +```sh +export AutoMihoyoBBS_config_path="/ql/data/config/" +``` + +### 3.复制配置文件 + +**进入容器后运行以下命令**(docker exec -it ql bash)修改ql为你的青龙容器名字 + +```sh +cp /ql/data/repo/Womsxd_AutoMihoyoBBS/config/config.yaml.example /ql/data/config/config.yaml +``` + +### 4.添加依赖 + +在青龙面板依赖管理中添加httpx及PyYAML + +### 5.编辑配置文件 + +在配置文件内config.yaml中编辑信息 + +*注:通知配置为青龙config.sh中配置* + ## 使用的第三方库 requests: [github](https://github.com/psf/requests) [pypi](https://pypi.org/project/requests/) (当httpx无法使用时使用)