Skip to content

Commit

Permalink
优化部分代码
Browse files Browse the repository at this point in the history
  • Loading branch information
XiYan233 authored Jun 13, 2021
1 parent c41d03b commit ecf72c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def userinfo():
print("目前账户云豆:" + str(userinfo_json['data']['cloudBean']) + "个")
return str(userinfo_json['data']['cloudBean'])

userinfo()
userinfo = userinfo()


#企业微信机器人推送
Expand All @@ -104,7 +104,7 @@ def push():
data = {
"msgtype": "markdown",
"markdown": {
"content": "<font color=\"warning\">网易音乐人签到通知</font>\n" + '> 当前云豆总数:' + "<font color=\"warning\">" + userinfo() + "</font>个" + '\n ' + '\n 运行日志:\n' + loginlog + '\n' + get_task_log + '\n' + checklog
"content": "<font color=\"warning\">网易音乐人签到通知</font>\n" + '> 当前云豆总数:' + "<font color=\"warning\">" + userinfo + "</font>个" + '\n ' + '\n 运行日志:\n' + loginlog + '\n' + get_task_log + '\n' + checklog
}
}
push = requests.post(url='https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=' + robot_key, headers=headers, json=data)
Expand All @@ -117,4 +117,4 @@ def push():
else:
print("未开启企业机器人推送")

push()
push()

0 comments on commit ecf72c2

Please sign in to comment.