-
Notifications
You must be signed in to change notification settings - Fork 133
/
fc.py
59 lines (57 loc) · 2.64 KB
/
fc.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
#!/usr/bin/python3
# -- coding: utf-8 --
# @Time : 2024/8/10 9:23
# -------------------------------
# cron "30 8 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('福彩活动');
#活动地址:https://rf24-h1.cwlo.com.cn/?inviterId=15287&from=qr或者https://rf24-h1.cwlo.com.cn/?inviterId=24889&from=qr
#变量名fcau 抓取https://rf24-serv.cwlo.com.cn这个域名下的Authorization 如果填配置文件就用&隔开 或者一个个的加入环境变量
import requests,json,os
aulist=os.getenv("fcau").split('&')
print(f'获取到{len(aulist)}个账号'+'\n'+'*'*20)
for au in range(len(aulist)):
print(f'开始执行账号{au+1}')
try:
headers = {
"Authorization": aulist[au],
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.47(0x18002f2c) NetType/WIFI Language/zh_CN",
}
#获取阳光列表
print('开始获取阳光列表>>')
resp1 = requests.post('https://rf24-serv.cwlo.com.cn/api/user/sun/list', headers=headers,data='last_id=')
sunlist = json.loads(resp1.text)['data']['list']
for i in sunlist:
sunid = i['id']
print(sunid)
#收获阳光
print('开始获取阳光>>')
data = {'id':sunid}
resp_getsun=requests.post('https://rf24-serv.cwlo.com.cn/api/user/sun/status', headers=headers,data=data)
print(resp_getsun.text)
#获取花朵数
print('开始获取花朵数>>')
resp2 = requests.post('https://rf24-serv.cwlo.com.cn/api/user/info', headers=headers)
flower = json.loads(resp2.text)['data']['user']['flower']
print(f'当前剩余花朵{flower}')
# 赠花
if flower ==0:
print('不执行赠花')
else:
for a in range(flower):
print('开始赠送花朵>>')
response = requests.post('https://rf24-serv.cwlo.com.cn/api/welfare/donation', headers=headers)
print(response.text)
#获取抽奖次数
resp3 = requests.post('https://rf24-serv.cwlo.com.cn/api/lottery/user', headers=headers)
lottery_count = json.loads(resp3.text)['data']['lottery_count']
print(f'剩余抽检抽奖次数{lottery_count}')
#抽奖
if lottery_count ==0:
print('不执行抽奖')
else:
for b in range(lottery_count):
resp4 = requests.post('https://rf24-serv.cwlo.com.cn/api/lottery/start', headers=headers)
print(resp4.text)
except:
print('该账号失效')
continue