-
Notifications
You must be signed in to change notification settings - Fork 46
/
sync.py
78 lines (70 loc) · 2.46 KB
/
sync.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
'''
new Env('所有女生会员');
变量名:syns_data抓Authorization每个号@隔开
cron: 16 9 * * *
fix 20240625 ArcadiaScriptPublic 频道:https://t.me/ArcadiaScript 群组:https://t.me/ArcadiaScriptPublic
增加打印签到信息
'''
import requests
import os
accounts_info = os.environ.get("syns_data")
accounts = accounts_info.split("@")
message = ""
def signin(account_info, account_index):
global message
env = 'bearer '+account_info
signin_url = "https://7.meionetech.com/api/operate/wx/record/signIn"
headers = {
'user-agent': 'Your User Agent Here',
'content-type': 'application/json',
'authorization': env,
}
response = requests.post(signin_url, headers=headers)
result = response.json()
if result.get('code') == "000":
message += f"【账号 {account_index} 签到】:签到成功🎉\n"
else:
message += f"【账号 {account_index} 签到】:{result.get('message')}\n"
def viewcust(account_info, account_index):
global message
env = 'bearer '+account_info
viewcust_url = "https://7.meionetech.com/api/operate/wx/rewards/task/done?taskId=38"
headers = {
'user-agent': 'Your User Agent Here',
'authorization': env,
}
data = {
'taskId': 38
}
response = requests.post(viewcust_url, headers=headers, json=data)
result = response.json()
if result.get('code') == "000":
message += f"【账号 {account_index} 积分商城】:浏览积分商城成功!\n"
else:
message += f"【账号 {account_index} 积分商城】:{result.get('message')}\n"
def score(account_info, account_index):
global message
env = 'bearer '+account_info
score_url = "https://7.meionetech.com/api/account/wx/member/assets"
headers = {
'user-agent': 'Your User Agent Here',
'authorization': env,
}
response = requests.get(score_url, headers=headers)
result = response.json()
if result.get('code') == "000":
message += f"【账号 {account_index} 积分】:{result.get('data').get('score')}\n"
else:
message += f"【账号 {account_index} 积分】:{result.get('message')}\n"
def main():
global message
for i, account_info in enumerate(accounts, start=1):
message += f"开始处理账号 {i}\n"
signin(account_info, i)
viewcust(account_info, i)
score(account_info, i)
notify()
def notify():
print(message)
if __name__ == '__main__':
main()