forked from 0-8-4/miui-auto-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '0-8-4:master' into master
- Loading branch information
Showing
4 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
# new Env("MIUI-Auto-Task 环境配置") | ||
echo "在本任务运行完后请不要忘记禁用该任务!" | ||
echo "在本任务运行完后请不要忘记禁用该任务!" | ||
echo "在本任务运行完后请不要忘记禁用该任务!" | ||
echo "————————————" | ||
echo "开始安装依赖" | ||
pip install -i https://mirrors.aliyun.com/pypi/simple/ -r /ql/data/repo/0-8-4_miui-auto-tasks_master/requirements.txt | ||
echo "依赖已安装完毕" | ||
echo "————————————" | ||
echo "开始首次执行" | ||
task 0-8-4_miui-auto-tasks_master/miuitask.py | ||
echo "首次执行完毕" | ||
echo "————————————" | ||
echo "请不要忘记禁用该任务!" | ||
echo "请不要忘记禁用该任务!" | ||
echo "请不要忘记禁用该任务!" | ||
echo "请到 脚本管理 - 0-8-4_miui-auto-tasks_master - data - config.yml 中配置参数" | ||
echo "————————————" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
""" | ||
Date: 2023-11-13 20:29:19 | ||
LastEditors: Night-stars-1 [email protected] | ||
LastEditTime: 2023-11-13 20:29:58 | ||
""" | ||
# new Env("MIUI-Auto-Task") | ||
# cron 30 8 * * * miuitask.py | ||
|
||
import asyncio | ||
|
||
from utils.api.login import Login | ||
|
@@ -28,7 +26,10 @@ async def main(): | |
if not task.showType: | ||
log.info(f"开始执行{task.name}任务") | ||
if task_obj := sign_task_obj.get(task.name): # 签到任务对象 | ||
await task_obj(cookies, token).sign() | ||
if getattr(account, task_obj.__name__): | ||
await task_obj(cookies, token).sign() | ||
else: | ||
log.info(f"任务{task.name}被禁用") | ||
else: | ||
log.error(f"未找到{task.name}任务") | ||
else: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters