forked from villagebully8/yybs
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path星芽短剧.py
312 lines (290 loc) · 13.3 KB
/
星芽短剧.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
#软件星芽短剧
#青龙变量xydj,抓取软件变量Authorization
from cgitb import text
import json
import time
import requests as r
import re
import os
import random
adv=1
if os.environ.get("xydj"):
dvm = os.environ["xydj"]
if dvm != '':
if "@" in dvm:
Coo = dvm.split("@")
elif "&" in dvm:
Coo = dvm.split('&')
else:
Coo = dvm.split('\n')
adv=1
for i in Coo:
try:
#个人信息
xxurl = "https://app.whjzjx.cn/v1/account/detail"
#签到
signurl = "https://speciesweb.whjzjx.cn/v1/sign/do"
#任务列表
rwlburl = "https://speciesweb.whjzjx.cn/v1/task/list?device_id=252cf01c9b6793c92afb138cb390b5e65"
#收藏
scurl = "https://app.whjzjx.cn/v1/theater/doing_look_v2"
#看广告
adurl = "https://speciesweb.whjzjx.cn/v1/sign"
#再看广告&签到看广告
zkadurl = "https://speciesweb.whjzjx.cn/v1/task_ad/claim"
#点赞
dzurl = "https://speciesweb.whjzjx.cn/v1/task/like"
#加观看时长
gkscurl = "https://speciesweb.whjzjx.cn/v1/sign/escalation"
#观看时长奖励领取
gkjlurl = "https://speciesweb.whjzjx.cn/v1/sign/sign_multi_stage"
#开宝箱
kbxurl = "https://speciesweb.whjzjx.cn/v1/box/open"
#开宝箱广告
bxadurl = "https://speciesweb.whjzjx.cn/v1/box/view_ad"
headers = {
"content-length": "0",
"pragma": "no-cache",
"cache-control": "no-cache",
"os_version": "7.1.2",
"authorization": i,
"device_brand": "Redmi",
"device_platform": "android",
"accept": "application/json, text/plain, */*",
"user-agent": "Mozilla/5.0 (Linux; Android 7.1.2; M2012K11AC Build/N6F26Q; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.117 Mobile Safari/537.36 _dsbridge",
"channel": "default",
"user_agent": "Mozilla/5.0 (Linux; Android 7.1.2; M2012K11AC Build/N6F26Q; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.117 Mobile Safari/537.36 _dsbridge",
"app_version": "2.3.0.1",
"origin": "https://h5static.jzjxwh.cn",
"x-requested-with": "com.jz.xydj",
"sec-fetch-site": "cross-site",
"sec-fetch-mode": "cors",
"sec-fetch-dest": "empty",
"accept-encoding": "gzip, deflate",
"accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"
}
# 各个任务的请求
#查看CK是否有问题
def denglu():
global adv
dl = r.get(xxurl, headers=headers)
dll = json.loads(dl.text)
if dll["msg"] == "成功":
name = dll["data"]["nickname"]
print(f'******开始【星芽免费短剧账号{adv}】{name} *********')
#获取账号金币数量现金数量
print("💰目前金币数量:"+str(dll["data"]["species"]))
print("💰可提现:"+str(dll["data"]["cash_remain"]))
else:
print("登录失败,请重新获取Authorization")
# continue
#签到
def qiandao():
qd = r.post(signurl, headers=headers)
qdd = json.loads(qd.text)
print("📅开始签到")
if qdd["msg"] == "success":
print("✅签到成功获取金币:"+str(qdd["data"]["coin_val"]))
time.sleep(2)
signad()
else:
print("❌签到失败原因:"+str(qdd["msg"]))
def signad():
# 广告body
zkadbody = {"ad_type":4}
zkad = r.post(zkadurl, headers=headers, json=zkadbody)
zkkadd = json.loads(zkad.text)
if zkkadd["code"] == "ok":
print("💱看签到广告成功获取金币:"+str(zkkadd["data"]["coin_val"]))
else:
print("❌再看广告失败,原因:"+str(zkkadd["msg"]))
#看广告
def lookad():
# 广告body
adbody = {"type":4,"mark":2}
ad = r.post(adurl, headers=headers, json=adbody)
add = json.loads(ad.text)
if add["msg"] == "签到成功":
print("💱看广告成功获取金币:"+str(add["data"]["species"]))
else:
print("❌看广告失败原因:"+str(add["msg"]))
#再看广告
def looklookad():
# 广告body
zkadbody = {"ad_type":2}
zkad = r.post(zkadurl, headers=headers, json=zkadbody)
zkkadd = json.loads(zkad.text)
if zkkadd["code"] == "ok":
print("💱再看广告成功获取金币:"+str(zkkadd["data"]["coin_val"]))
else:
print("❌再看广告失败,原因:"+str(zkkadd["msg"]))
#收藏请求
def shoucang():
# 随机数
sjs = random.randint(1, 2000)
# 收藏body
scbody = {"kind": 2, "target_id": sjs, "category": 1, "is_auto_collect": False}
sc = r.post(scurl, headers=headers, json=scbody)
scc = json.loads(sc.text)
if scc["msg"] == "成功":
print("✅收藏成功")
else:
print("❌收藏失败")
#点赞请求
def dianzan():
# 随机数
sjs = random.randint(1, 116161)
# 点赞body
dzbody = {"theater_id": sjs}
dz = r.post(dzurl, headers=headers, json=dzbody)
dzz = json.loads(dz.text)
if dzz["msg"] == "success":
print("💱点赞成功获取金币:"+str(dzz["data"]["info"]["coin_val"]))
else:
print("❌点赞失败,原因:"+str(dzz["msg"]))
#观看加时长
def gksc():
print("🆙观看加时长运行")
for _ in range(10):
gkbody = {"type": 3}
gk = r.post(gkscurl, headers=headers, json=gkbody)
gkk = json.loads(gk.text)
if gkk["msg"] == "上报成功":
print("📈增加时长成功")
time.sleep(2)
else:
print("❌增加失败,原因:"+str(gkk["msg"]))
time.sleep(2)
lqbody = {"type":3,"makes":[1,2,3,4,5,6,7],"device_id":"87387123-7A4D-4B6A-912A-30CABD9CD4B3"}
lq = r.post(gkjlurl, headers=headers, json=lqbody)
lqq = json.loads(lq.text)
# print(lqq)
if lqq["msg"] == "签到成功":
print("💱领取观看时长金币成功:"+str(lqq["data"]["coin_value"]))
else:
print("❌领取观看时长金币失败,原因:"+str(lqq["msg"]))
break
def adbox():
print("📺观看宝箱广告1")
bxadbody = {"config_id":3,"coin_val":72,"ad_num":2}
bxad = r.post(bxadurl, headers=headers, json=bxadbody)
bxadd = json.loads(bxad.text)
if bxadd["msg"] == "success":
print("💰宝箱广告观看成功获得金币:"+str(bxadd["data"]["coin_val"]))
else:
print("❌开宝箱失败,原因:"+str(bxadd["msg"]))
def adbox2():
print("📺观看宝箱广告2")
bxadbody = {"config_id":3,"coin_val":72,"ad_num":1}
bxad = r.post(bxadurl, headers=headers, json=bxadbody)
bxadd = json.loads(bxad.text)
if bxadd["msg"] == "success":
print("💰宝箱广告观看成功获得金币:"+str(bxadd["data"]["coin_val"]))
else:
print("❌开宝箱失败,原因:"+str(bxadd["msg"]))
#开宝箱
def openbox():
print("🆙观看加时长运行")
time.sleep(2)
for _ in range(10):
boxbody = {"config_id":3}
box = r.post(kbxurl, headers=headers, json=boxbody)
boxx = json.loads(box.text)
if boxx["msg"] == "success":
print("🗳️开宝箱成功获得金币:"+str(boxx["data"]["coin_val"]))
time.sleep(2)
adbox()
time.sleep(2)
adbox2()
time.sleep(2)
else:
print("❌开宝箱失败,原因:"+str(boxx["msg"]))
break
#主程序
#登录
denglu()
adv=adv+1
#等待
time.sleep(2)
#签到
qiandao()
#观看加时长
gksc()
#开宝箱
openbox()
#等待
time.sleep(2)
print("📊查看任务列表")
# 获取任务列表
class Task:
def __init__(self, code, num, total):
self.code = code
self.num = num
self.total = total
def is_completed(self):
if self.total is not None and self.num >= self.total:
return True
elif self.total is None:
return True
else:
return False
# 用请求获取任务列表
rwlb = r.get(rwlburl, headers=headers)
rwlbb = json.loads(rwlb.text)
task_list_data = rwlbb['data']['task_list']
# 创建任务列表
tasks = []
# 填充任务列表
for task_data in task_list_data:
code = task_data['code']
ext_data = task_data.get('ext')
if ext_data is not None:
num = ext_data.get('num', 0)
total = ext_data.get('total')
else:
num = 0
total = None
task = Task(code, num, total)
tasks.append(task)
# 生成任务描述
for task in tasks:
if task.is_completed():
#print(f"{task.code} 任务已完成。")
# 在这里可以添加相应的任务完成后的操作
if task.code == '1030':
print(f"🆗收藏新剧任务已完成!({task.num}/{task.total})")
elif task.code == '1060':
print(f"🆗看视频金币任务已完成!({task.num}/{task.total})")
elif task.code == '1080':
print(f"🆗点赞剧集任务已完成!({task.num}/{task.total})")
elif task.code == '1070':
print(f"🆗分享短剧任务已完成!({task.num}/{task.total})")
else:
if task.code == '1030':
print(f"收藏新剧({task.num}/{task.total})")
print("🔛任务没完成开始收藏新剧")
time.sleep(2)
for _ in range(task.total - task.num):
shoucang()
time.sleep(2)
elif task.code == '1060':
print(f"看视频金币({task.num}/{task.total})")
print("🔛任务没完成开始看广告")
time.sleep(2)
for _ in range(task.total - task.num):
lookad()
time.sleep(2)
looklookad()
time.sleep(2)
elif task.code == '1080':
print(f"点赞剧集({task.num}/{task.total})")
time.sleep(2)
for _ in range(task.total - task.num):
dianzan()
time.sleep(2)
elif task.code == '1070':
print(f"分享短剧({task.num}/{task.total})")
else:
print(f"{task.code} 任务描述未指定。")
except:
print("⚠️⚠️⚠️脚本报错执行下一个账号⚠️⚠️⚠️")