cynika commited on
Commit
c9ecd6c
·
1 Parent(s): 3dfde90
Files changed (5) hide show
  1. app.py +63 -0
  2. bili.json +1054 -0
  3. login.py +69 -0
  4. nft.py +160 -0
  5. requirements.txt +6 -0
app.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import io
2
+
3
+ import gradio as gr
4
+ from PIL import Image
5
+
6
+ from login import catch_qr, get_uid_key
7
+ from nft import up_card
8
+
9
+
10
+ def qr(ava_image):
11
+ if ava_image is not None:
12
+ height, width = ava_image.shape[:2]
13
+ if height < 1024 and width < 1024:
14
+ qr_img, info = catch_qr(ava_image)
15
+ return {image_qr: qr_img, login_info: info}
16
+ return {image_qr: None, login_info: None}
17
+
18
+
19
+ def login_up_nft(ava_image, info):
20
+ if info is not None:
21
+ result, uid, key, code = get_uid_key(info)
22
+ if result:
23
+ image = Image.fromarray(ava_image)
24
+ bytes_object = io.BytesIO()
25
+ image.save(bytes_object, format='JPEG')
26
+ img_data = bytes_object.getvalue()
27
+ result, code = up_card(uid, key, img_data)
28
+ return code
29
+ else:
30
+ return code
31
+ return "请先上传头像和扫码登录"
32
+
33
+
34
+ with gr.Blocks() as demo:
35
+ login_info = gr.State([])
36
+ with gr.Tab("bili_NFT自定义头像"):
37
+ gr.Markdown("30秒自定义钻石头像(NFT),一站式操作仅三步,无需下载安装,代码开源")
38
+ gr.Markdown("第一步:")
39
+ gr.Markdown("""领取三体数字藏品R级别,作为自定义NFT头像底图.
40
+ [三体数字藏品领取地址](https://www.bilibili.com/h5/mall/v2/card/collection?act_id=14&hybrid_set_header=2)""")
41
+ gr.Markdown("""https://www.bilibili.com/h5/mall/v2/card/collection?act_id=14&hybrid_set_header=2""")
42
+ gr.Markdown("第二步:")
43
+ with gr.Row():
44
+ with gr.Column():
45
+ gr.Markdown("确保第一步领取三体数字藏品后,上传新头像,头像尽量为正方形并小于1024*1024像素,然后等待生成二维码并扫码登录进行授权(左上传头像,右扫码登录))")
46
+ image_ava = gr.Image()
47
+ image_qr = gr.Image()
48
+ gr.Markdown("第三步:")
49
+ with gr.Row():
50
+ gr.Markdown("""第二步完成后,3-15s内点击按钮<验证登录并提交头像>等待任务完成显示结果(成功可能需要时间审核)""")
51
+ text_button = gr.Button("验证登录并提交头像")
52
+ code_output = gr.Textbox(placeholder="提交结果")
53
+
54
+ with gr.Accordion("代码来源及郑重提醒"):
55
+ gr.Markdown("https://github.com/wdvipa/custom_bilibili_nft")
56
+ gr.Markdown("https://github.com/XiaoMiku01/custom_bilibili_nft")
57
+ gr.Markdown("https://github.com/cibimo/bilibiliLogin")
58
+ gr.Markdown("本软件纯属娱乐,不得用于其他用途,秋后算账别怨我!")
59
+
60
+ image_ava.change(qr, inputs=[image_ava], outputs=[image_qr, login_info])
61
+ text_button.click(login_up_nft, inputs=[image_ava, login_info], outputs=[code_output])
62
+
63
+ demo.launch()
bili.json ADDED
@@ -0,0 +1,1054 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "code": 0,
3
+ "message": "0",
4
+ "ttl": 1,
5
+ "data": {
6
+ "uname": "Cynika",
7
+ "uface": "https://i1.hdslb.com/bfs/face/e1be36338fcd8824ef2fbfea030fb03ca02e2e28.png",
8
+ "comment_img": "",
9
+ "public_list": null,
10
+ "exchange_list": null,
11
+ "round_list": [
12
+ {
13
+ "round_index": 0,
14
+ "round_name": "神秘情报",
15
+ "card_list": [
16
+ {
17
+ "card_type_id": 617415,
18
+ "card_name": "它们出发了·R",
19
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/50997a799e7086821e17d11d0b4fa3bea4aaf3f9.png",
20
+ "card_type": 1,
21
+ "card_id_list": null,
22
+ "total_cnt": 0,
23
+ "total_cnt_show": "000000",
24
+ "holding_rate": 0,
25
+ "video_list": null,
26
+ "is_req_detail": 0,
27
+ "card_scarcity": 20,
28
+ "is_mute": 0,
29
+ "width": 1242,
30
+ "height": 1863
31
+ },
32
+ {
33
+ "card_type_id": 617404,
34
+ "card_name": "罗辑讲堂·R",
35
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/6853cf7998d3da4b175543ccb325940f2f27d954.png",
36
+ "card_type": 1,
37
+ "card_id_list": null,
38
+ "total_cnt": 0,
39
+ "total_cnt_show": "000000",
40
+ "holding_rate": 0,
41
+ "video_list": null,
42
+ "is_req_detail": 0,
43
+ "card_scarcity": 20,
44
+ "is_mute": 0,
45
+ "width": 1242,
46
+ "height": 1863
47
+ },
48
+ {
49
+ "card_type_id": 617423,
50
+ "card_name": "智子展开·R",
51
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/e1361629c711f288820aa139cb885566a2a79094.png",
52
+ "card_type": 1,
53
+ "card_id_list": null,
54
+ "total_cnt": 0,
55
+ "total_cnt_show": "000000",
56
+ "holding_rate": 0,
57
+ "video_list": null,
58
+ "is_req_detail": 0,
59
+ "card_scarcity": 20,
60
+ "is_mute": 0,
61
+ "width": 1242,
62
+ "height": 1863
63
+ },
64
+ {
65
+ "card_type_id": 617412,
66
+ "card_name": "人类科学家·R",
67
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/2c6480e7731d3c01cfcce43c8d1609786d41d393.png",
68
+ "card_type": 1,
69
+ "card_id_list": null,
70
+ "total_cnt": 0,
71
+ "total_cnt_show": "000000",
72
+ "holding_rate": 0,
73
+ "video_list": null,
74
+ "is_req_detail": 0,
75
+ "card_scarcity": 20,
76
+ "is_mute": 0,
77
+ "width": 1242,
78
+ "height": 1863
79
+ },
80
+ {
81
+ "card_type_id": 617421,
82
+ "card_name": "智子锁死科技·R",
83
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/2c5fe7efedae4259fc751efba1e5a66f0c9bcda2.png",
84
+ "card_type": 1,
85
+ "card_id_list": null,
86
+ "total_cnt": 0,
87
+ "total_cnt_show": "000000",
88
+ "holding_rate": 0,
89
+ "video_list": null,
90
+ "is_req_detail": 0,
91
+ "card_scarcity": 20,
92
+ "is_mute": 0,
93
+ "width": 1242,
94
+ "height": 1863
95
+ },
96
+ {
97
+ "card_type_id": 617420,
98
+ "card_name": "智子监视·R",
99
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/dc91e6d1a587b3b2c3abf7ebe958b7b7a4d5240f.png",
100
+ "card_type": 1,
101
+ "card_id_list": null,
102
+ "total_cnt": 0,
103
+ "total_cnt_show": "000000",
104
+ "holding_rate": 0,
105
+ "video_list": null,
106
+ "is_req_detail": 0,
107
+ "card_scarcity": 20,
108
+ "is_mute": 0,
109
+ "width": 1242,
110
+ "height": 1863
111
+ },
112
+ {
113
+ "card_type_id": 617393,
114
+ "card_name": "“希望”·R",
115
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/7e4658d431dee3335291f4edba05ac234fa2475f.png",
116
+ "card_type": 1,
117
+ "card_id_list": null,
118
+ "total_cnt": 0,
119
+ "total_cnt_show": "000000",
120
+ "holding_rate": 0,
121
+ "video_list": null,
122
+ "is_req_detail": 0,
123
+ "card_scarcity": 20,
124
+ "is_mute": 0,
125
+ "width": 1242,
126
+ "height": 1863
127
+ },
128
+ {
129
+ "card_type_id": 617411,
130
+ "card_name": "人类的英雄·R",
131
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/8009c518080a7044b5706871d1c94bf2e5d92449.png",
132
+ "card_type": 1,
133
+ "card_id_list": null,
134
+ "total_cnt": 0,
135
+ "total_cnt_show": "000000",
136
+ "holding_rate": 0,
137
+ "video_list": null,
138
+ "is_req_detail": 0,
139
+ "card_scarcity": 20,
140
+ "is_mute": 0,
141
+ "width": 1242,
142
+ "height": 1863
143
+ },
144
+ {
145
+ "card_type_id": 617397,
146
+ "card_name": "古筝行动·R",
147
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/76fb54a40581c0cf7be3e2c01039278eb75bc958.png",
148
+ "card_type": 1,
149
+ "card_id_list": null,
150
+ "total_cnt": 0,
151
+ "total_cnt_show": "000000",
152
+ "holding_rate": 0,
153
+ "video_list": null,
154
+ "is_req_detail": 0,
155
+ "card_scarcity": 20,
156
+ "is_mute": 0,
157
+ "width": 1242,
158
+ "height": 1863
159
+ },
160
+ {
161
+ "card_type_id": 617406,
162
+ "card_name": "面壁大会·R",
163
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/07572802063270467390731705bd97d11a2ee4ec.png",
164
+ "card_type": 1,
165
+ "card_id_list": null,
166
+ "total_cnt": 0,
167
+ "total_cnt_show": "000000",
168
+ "holding_rate": 0,
169
+ "video_list": null,
170
+ "is_req_detail": 0,
171
+ "card_scarcity": 20,
172
+ "is_mute": 0,
173
+ "width": 1242,
174
+ "height": 1863
175
+ },
176
+ {
177
+ "card_type_id": 617413,
178
+ "card_name": "人类无秘密·R",
179
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/5e843652163f7d85c83a8d2df460aa0e4e9cf3a9.png",
180
+ "card_type": 1,
181
+ "card_id_list": null,
182
+ "total_cnt": 0,
183
+ "total_cnt_show": "000000",
184
+ "holding_rate": 0,
185
+ "video_list": null,
186
+ "is_req_detail": 0,
187
+ "card_scarcity": 20,
188
+ "is_mute": 0,
189
+ "width": 1242,
190
+ "height": 1863
191
+ },
192
+ {
193
+ "card_type_id": 617403,
194
+ "card_name": "罗辑放弃面壁·R",
195
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/a0cab24889fddf060f0eb9854674a8a067f750f3.png",
196
+ "card_type": 1,
197
+ "card_id_list": null,
198
+ "total_cnt": 0,
199
+ "total_cnt_show": "000000",
200
+ "holding_rate": 0,
201
+ "video_list": null,
202
+ "is_req_detail": 0,
203
+ "card_scarcity": 20,
204
+ "is_mute": 0,
205
+ "width": 1242,
206
+ "height": 1863
207
+ },
208
+ {
209
+ "card_type_id": 617392,
210
+ "card_name": "“害怕”·R",
211
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/e63d1e95ab6abfb413fc785db06d82b0cc5323c2.png",
212
+ "card_type": 1,
213
+ "card_id_list": null,
214
+ "total_cnt": 0,
215
+ "total_cnt_show": "000000",
216
+ "holding_rate": 0,
217
+ "video_list": null,
218
+ "is_req_detail": 0,
219
+ "card_scarcity": 20,
220
+ "is_mute": 0,
221
+ "width": 1242,
222
+ "height": 1863
223
+ },
224
+ {
225
+ "card_type_id": 617416,
226
+ "card_name": "透明思维·R",
227
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/15592f588ab57de235bb45137c01c609a8558b4a.png",
228
+ "card_type": 1,
229
+ "card_id_list": null,
230
+ "total_cnt": 0,
231
+ "total_cnt_show": "000000",
232
+ "holding_rate": 0,
233
+ "video_list": null,
234
+ "is_req_detail": 0,
235
+ "card_scarcity": 20,
236
+ "is_mute": 0,
237
+ "width": 1242,
238
+ "height": 1863
239
+ },
240
+ {
241
+ "card_type_id": 617395,
242
+ "card_name": "虫子·R",
243
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/e63f68cc11a3ff4e208933a3a4ba854b25b7d21f.png",
244
+ "card_type": 1,
245
+ "card_id_list": null,
246
+ "total_cnt": 0,
247
+ "total_cnt_show": "000000",
248
+ "holding_rate": 0,
249
+ "video_list": null,
250
+ "is_req_detail": 0,
251
+ "card_scarcity": 20,
252
+ "is_mute": 0,
253
+ "width": 1242,
254
+ "height": 1863
255
+ },
256
+ {
257
+ "card_type_id": 617422,
258
+ "card_name": "智子无处不在·R",
259
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/25b9b0420bcd73ebef1a0733a2bbd57bae547954.png",
260
+ "card_type": 1,
261
+ "card_id_list": null,
262
+ "total_cnt": 0,
263
+ "total_cnt_show": "000000",
264
+ "holding_rate": 0,
265
+ "video_list": null,
266
+ "is_req_detail": 0,
267
+ "card_scarcity": 20,
268
+ "is_mute": 0,
269
+ "width": 1242,
270
+ "height": 1863
271
+ },
272
+ {
273
+ "card_type_id": 617394,
274
+ "card_name": "不是普通人·R",
275
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/1d560ea2747e506e7646a9c8ec545ed5cb58c6c5.png",
276
+ "card_type": 1,
277
+ "card_id_list": null,
278
+ "total_cnt": 0,
279
+ "total_cnt_show": "000000",
280
+ "holding_rate": 0,
281
+ "video_list": null,
282
+ "is_req_detail": 0,
283
+ "card_scarcity": 20,
284
+ "is_mute": 0,
285
+ "width": 1242,
286
+ "height": 1863
287
+ },
288
+ {
289
+ "card_type_id": 617407,
290
+ "card_name": "破壁计划·R",
291
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/753fb69c29be816051f6d6c3ab57bd2536d71e0e.png",
292
+ "card_type": 1,
293
+ "card_id_list": null,
294
+ "total_cnt": 0,
295
+ "total_cnt_show": "000000",
296
+ "holding_rate": 0,
297
+ "video_list": null,
298
+ "is_req_detail": 0,
299
+ "card_scarcity": 20,
300
+ "is_mute": 0,
301
+ "width": 1242,
302
+ "height": 1863
303
+ },
304
+ {
305
+ "card_type_id": 617426,
306
+ "card_name": "以恶制恶·R",
307
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/c6a2f2c1404c43cc2c745b65889f472ba3d1516c.png",
308
+ "card_type": 1,
309
+ "card_id_list": null,
310
+ "total_cnt": 0,
311
+ "total_cnt_show": "000000",
312
+ "holding_rate": 0,
313
+ "video_list": null,
314
+ "is_req_detail": 0,
315
+ "card_scarcity": 20,
316
+ "is_mute": 0,
317
+ "width": 1242,
318
+ "height": 1863
319
+ },
320
+ {
321
+ "card_type_id": 617405,
322
+ "card_name": "秘密·R",
323
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/eaa255e3df41f7d24f45f5a803e03ca53c513dcf.png",
324
+ "card_type": 1,
325
+ "card_id_list": null,
326
+ "total_cnt": 0,
327
+ "total_cnt_show": "000000",
328
+ "holding_rate": 0,
329
+ "video_list": null,
330
+ "is_req_detail": 0,
331
+ "card_scarcity": 20,
332
+ "is_mute": 0,
333
+ "width": 1242,
334
+ "height": 1863
335
+ },
336
+ {
337
+ "card_type_id": 617410,
338
+ "card_name": "破壁人一号·R",
339
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/f26b58a44fd9af6bfa8673c4b7730a3573d33949.png",
340
+ "card_type": 1,
341
+ "card_id_list": null,
342
+ "total_cnt": 0,
343
+ "total_cnt_show": "000000",
344
+ "holding_rate": 0,
345
+ "video_list": null,
346
+ "is_req_detail": 0,
347
+ "card_scarcity": 20,
348
+ "is_mute": 0,
349
+ "width": 1242,
350
+ "height": 1863
351
+ },
352
+ {
353
+ "card_type_id": 617408,
354
+ "card_name": "破壁人二号·R",
355
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/2f9b76ac76761207325b64ba219332b82e90d294.png",
356
+ "card_type": 1,
357
+ "card_id_list": null,
358
+ "total_cnt": 0,
359
+ "total_cnt_show": "000000",
360
+ "holding_rate": 0,
361
+ "video_list": null,
362
+ "is_req_detail": 0,
363
+ "card_scarcity": 20,
364
+ "is_mute": 0,
365
+ "width": 1242,
366
+ "height": 1863
367
+ },
368
+ {
369
+ "card_type_id": 617409,
370
+ "card_name": "破壁人三号·R",
371
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/bb4a1097ce25a54d62e25aa1bb8e5e93a6e3c799.png",
372
+ "card_type": 1,
373
+ "card_id_list": null,
374
+ "total_cnt": 0,
375
+ "total_cnt_show": "000000",
376
+ "holding_rate": 0,
377
+ "video_list": null,
378
+ "is_req_detail": 0,
379
+ "card_scarcity": 20,
380
+ "is_mute": 0,
381
+ "width": 1242,
382
+ "height": 1863
383
+ },
384
+ {
385
+ "card_type_id": 617425,
386
+ "card_name": "对决·R",
387
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/71f88317cd531e59eefc73e46551c65f631389b2.png",
388
+ "card_type": 1,
389
+ "card_id_list": null,
390
+ "total_cnt": 0,
391
+ "total_cnt_show": "000000",
392
+ "holding_rate": 0,
393
+ "video_list": null,
394
+ "is_req_detail": 0,
395
+ "card_scarcity": 20,
396
+ "is_mute": 0,
397
+ "width": 1242,
398
+ "height": 1863
399
+ },
400
+ {
401
+ "card_type_id": 617396,
402
+ "card_name": "放宽心·R",
403
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/787692ebb517fe9d6ac3b0025c7c482a303dea7f.png",
404
+ "card_type": 1,
405
+ "card_id_list": null,
406
+ "total_cnt": 0,
407
+ "total_cnt_show": "000000",
408
+ "holding_rate": 0,
409
+ "video_list": null,
410
+ "is_req_detail": 0,
411
+ "card_scarcity": 20,
412
+ "is_mute": 0,
413
+ "width": 1242,
414
+ "height": 1863
415
+ },
416
+ {
417
+ "card_type_id": 617419,
418
+ "card_name": "演唱会·R",
419
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/831e5fda52d8d88a87e691080ea138c8f8392838.png",
420
+ "card_type": 1,
421
+ "card_id_list": null,
422
+ "total_cnt": 0,
423
+ "total_cnt_show": "000000",
424
+ "holding_rate": 0,
425
+ "video_list": null,
426
+ "is_req_detail": 0,
427
+ "card_scarcity": 20,
428
+ "is_mute": 0,
429
+ "width": 1242,
430
+ "height": 1863
431
+ },
432
+ {
433
+ "card_type_id": 617401,
434
+ "card_name": "厉害·R",
435
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/2fcddaec0757a485577b25dda8a0dd5d3496c5fa.png",
436
+ "card_type": 1,
437
+ "card_id_list": null,
438
+ "total_cnt": 0,
439
+ "total_cnt_show": "000000",
440
+ "holding_rate": 0,
441
+ "video_list": null,
442
+ "is_req_detail": 0,
443
+ "card_scarcity": 20,
444
+ "is_mute": 0,
445
+ "width": 1242,
446
+ "height": 1863
447
+ },
448
+ {
449
+ "card_type_id": 617424,
450
+ "card_name": "庄园·R",
451
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/7cb8ab417b1f76b6144ffc2d61c0852f3e808152.png",
452
+ "card_type": 1,
453
+ "card_id_list": null,
454
+ "total_cnt": 0,
455
+ "total_cnt_show": "000000",
456
+ "holding_rate": 0,
457
+ "video_list": null,
458
+ "is_req_detail": 0,
459
+ "card_scarcity": 20,
460
+ "is_mute": 0,
461
+ "width": 1242,
462
+ "height": 1863
463
+ },
464
+ {
465
+ "card_type_id": 617399,
466
+ "card_name": "计划的一部分·R",
467
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/4231d237aa26afb3d505a1d487ea20ade20304d7.png",
468
+ "card_type": 1,
469
+ "card_id_list": null,
470
+ "total_cnt": 0,
471
+ "total_cnt_show": "000000",
472
+ "holding_rate": 0,
473
+ "video_list": null,
474
+ "is_req_detail": 0,
475
+ "card_scarcity": 20,
476
+ "is_mute": 0,
477
+ "width": 1242,
478
+ "height": 1863
479
+ },
480
+ {
481
+ "card_type_id": 617398,
482
+ "card_name": "惠子·R",
483
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/eae3aff8c5c1253cc383aa8606ef8e7c6b00137e.png",
484
+ "card_type": 1,
485
+ "card_id_list": null,
486
+ "total_cnt": 0,
487
+ "total_cnt_show": "000000",
488
+ "holding_rate": 0,
489
+ "video_list": null,
490
+ "is_req_detail": 0,
491
+ "card_scarcity": 20,
492
+ "is_mute": 0,
493
+ "width": 1242,
494
+ "height": 1863
495
+ },
496
+ {
497
+ "card_type_id": 617402,
498
+ "card_name": "领悟·R",
499
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/3fa16e2742abd5a9c28638a27eb84276e686f6a5.png",
500
+ "card_type": 1,
501
+ "card_id_list": null,
502
+ "total_cnt": 0,
503
+ "total_cnt_show": "000000",
504
+ "holding_rate": 0,
505
+ "video_list": null,
506
+ "is_req_detail": 0,
507
+ "card_scarcity": 20,
508
+ "is_mute": 0,
509
+ "width": 1242,
510
+ "height": 1863
511
+ },
512
+ {
513
+ "card_type_id": 617414,
514
+ "card_name": "刷子·R",
515
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/a7cbb4049ca0ade1782e2fb23c70a9ac28b23243.png",
516
+ "card_type": 1,
517
+ "card_id_list": null,
518
+ "total_cnt": 0,
519
+ "total_cnt_show": "000000",
520
+ "holding_rate": 0,
521
+ "video_list": null,
522
+ "is_req_detail": 0,
523
+ "card_scarcity": 20,
524
+ "is_mute": 0,
525
+ "width": 1242,
526
+ "height": 1863
527
+ },
528
+ {
529
+ "card_type_id": 617400,
530
+ "card_name": "舰队尾迹·R",
531
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/d68d4a46196cb995d4b0dec3c700e8c2c22b05c8.png",
532
+ "card_type": 1,
533
+ "card_id_list": null,
534
+ "total_cnt": 0,
535
+ "total_cnt_show": "000000",
536
+ "holding_rate": 0,
537
+ "video_list": null,
538
+ "is_req_detail": 0,
539
+ "card_scarcity": 20,
540
+ "is_mute": 0,
541
+ "width": 1242,
542
+ "height": 1863
543
+ },
544
+ {
545
+ "card_type_id": 617417,
546
+ "card_name": "危机纪元·R",
547
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/4a4d3df87160694d583aa7ae7d13808f73530b28.png",
548
+ "card_type": 1,
549
+ "card_id_list": null,
550
+ "total_cnt": 0,
551
+ "total_cnt_show": "000000",
552
+ "holding_rate": 0,
553
+ "video_list": null,
554
+ "is_req_detail": 0,
555
+ "card_scarcity": 20,
556
+ "is_mute": 0,
557
+ "width": 1242,
558
+ "height": 1863
559
+ },
560
+ {
561
+ "card_type_id": 617418,
562
+ "card_name": "无人幸免·R",
563
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/3f7625d9dd0cfddbf8f380eeb225f3afb5049e78.png",
564
+ "card_type": 1,
565
+ "card_id_list": null,
566
+ "total_cnt": 0,
567
+ "total_cnt_show": "000000",
568
+ "holding_rate": 0,
569
+ "video_list": null,
570
+ "is_req_detail": 0,
571
+ "card_scarcity": 20,
572
+ "is_mute": 0,
573
+ "width": 1242,
574
+ "height": 1863
575
+ }
576
+ ]
577
+ },
578
+ {
579
+ "round_index": 1,
580
+ "round_name": "机密档案",
581
+ "card_list": [
582
+ {
583
+ "card_type_id": 614875,
584
+ "card_name": "面壁者勋章设定·SR",
585
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/0bb8ce3d70b0444cdb3878dcd861d7280ca8a3d1.png",
586
+ "card_type": 1,
587
+ "card_id_list": null,
588
+ "total_cnt": 0,
589
+ "total_cnt_show": "000000",
590
+ "holding_rate": 0,
591
+ "video_list": null,
592
+ "is_req_detail": 0,
593
+ "card_scarcity": 30,
594
+ "is_mute": 0,
595
+ "width": 1242,
596
+ "height": 1863
597
+ },
598
+ {
599
+ "card_type_id": 614867,
600
+ "card_name": "PDC徽章设定·SR",
601
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/07c961364beea63d8db92b4c9d91130870dac760.png",
602
+ "card_type": 1,
603
+ "card_id_list": null,
604
+ "total_cnt": 0,
605
+ "total_cnt_show": "000000",
606
+ "holding_rate": 0,
607
+ "video_list": null,
608
+ "is_req_detail": 0,
609
+ "card_scarcity": 30,
610
+ "is_mute": 0,
611
+ "width": 1242,
612
+ "height": 1863
613
+ },
614
+ {
615
+ "card_type_id": 614868,
616
+ "card_name": "PDC装甲车设定·SR",
617
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/596f6b74b0285cc3b491d07e896f571becda4390.png",
618
+ "card_type": 1,
619
+ "card_id_list": null,
620
+ "total_cnt": 0,
621
+ "total_cnt_show": "000000",
622
+ "holding_rate": 0,
623
+ "video_list": null,
624
+ "is_req_detail": 0,
625
+ "card_scarcity": 30,
626
+ "is_mute": 0,
627
+ "width": 1242,
628
+ "height": 1863
629
+ },
630
+ {
631
+ "card_type_id": 614866,
632
+ "card_name": "PDC护送飞机设定·SR",
633
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/a4d332e447f8e38f7870eb552e07981d3b5e681c.png",
634
+ "card_type": 1,
635
+ "card_id_list": null,
636
+ "total_cnt": 0,
637
+ "total_cnt_show": "000000",
638
+ "holding_rate": 0,
639
+ "video_list": null,
640
+ "is_req_detail": 0,
641
+ "card_scarcity": 30,
642
+ "is_mute": 0,
643
+ "width": 1242,
644
+ "height": 1863
645
+ },
646
+ {
647
+ "card_type_id": 614871,
648
+ "card_name": "对撞机设定·SR",
649
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/8c48ca3f1e4c49ead8bc5255809ded06fbc8f0cf.png",
650
+ "card_type": 1,
651
+ "card_id_list": null,
652
+ "total_cnt": 0,
653
+ "total_cnt_show": "000000",
654
+ "holding_rate": 0,
655
+ "video_list": null,
656
+ "is_req_detail": 0,
657
+ "card_scarcity": 30,
658
+ "is_mute": 0,
659
+ "width": 1242,
660
+ "height": 1863
661
+ },
662
+ {
663
+ "card_type_id": 614878,
664
+ "card_name": "审判日号设定·SR",
665
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/20c494ef9d8a1c0ad83c8c30b17bdc008c0aba7a.png",
666
+ "card_type": 1,
667
+ "card_id_list": null,
668
+ "total_cnt": 0,
669
+ "total_cnt_show": "000000",
670
+ "holding_rate": 0,
671
+ "video_list": null,
672
+ "is_req_detail": 0,
673
+ "card_scarcity": 30,
674
+ "is_mute": 0,
675
+ "width": 1242,
676
+ "height": 1863
677
+ },
678
+ {
679
+ "card_type_id": 614873,
680
+ "card_name": "罗辑·SR",
681
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/a5abb2c770ec594dbc24ed96d6bb5c30b33ce627.png",
682
+ "card_type": 1,
683
+ "card_id_list": null,
684
+ "total_cnt": 0,
685
+ "total_cnt_show": "000000",
686
+ "holding_rate": 0,
687
+ "video_list": null,
688
+ "is_req_detail": 0,
689
+ "card_scarcity": 30,
690
+ "is_mute": 0,
691
+ "width": 1242,
692
+ "height": 1863
693
+ },
694
+ {
695
+ "card_type_id": 614874,
696
+ "card_name": "曼努尔·雷迪亚兹·SR",
697
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/7497cf91af305e7cd7b43ab721beb0652f2e8698.png",
698
+ "card_type": 1,
699
+ "card_id_list": null,
700
+ "total_cnt": 0,
701
+ "total_cnt_show": "000000",
702
+ "holding_rate": 0,
703
+ "video_list": null,
704
+ "is_req_detail": 0,
705
+ "card_scarcity": 30,
706
+ "is_mute": 0,
707
+ "width": 1242,
708
+ "height": 1863
709
+ },
710
+ {
711
+ "card_type_id": 614869,
712
+ "card_name": "比尔 •希恩斯·SR",
713
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/143d12cc1801cf04f6d055d07efa84b3b713e3b0.png",
714
+ "card_type": 1,
715
+ "card_id_list": null,
716
+ "total_cnt": 0,
717
+ "total_cnt_show": "000000",
718
+ "holding_rate": 0,
719
+ "video_list": null,
720
+ "is_req_detail": 0,
721
+ "card_scarcity": 30,
722
+ "is_mute": 0,
723
+ "width": 1242,
724
+ "height": 1863
725
+ },
726
+ {
727
+ "card_type_id": 614870,
728
+ "card_name": "丁仪·SR",
729
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/b9b00fff755c10fad398435169ba7e8824540b1d.png",
730
+ "card_type": 1,
731
+ "card_id_list": null,
732
+ "total_cnt": 0,
733
+ "total_cnt_show": "000000",
734
+ "holding_rate": 0,
735
+ "video_list": null,
736
+ "is_req_detail": 0,
737
+ "card_scarcity": 30,
738
+ "is_mute": 0,
739
+ "width": 1242,
740
+ "height": 1863
741
+ },
742
+ {
743
+ "card_type_id": 614872,
744
+ "card_name": "弗里德里克·泰勒·SR",
745
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/bcea6bf2957398892f26a9fdac81e1ff0ade87f2.png",
746
+ "card_type": 1,
747
+ "card_id_list": null,
748
+ "total_cnt": 0,
749
+ "total_cnt_show": "000000",
750
+ "holding_rate": 0,
751
+ "video_list": null,
752
+ "is_req_detail": 0,
753
+ "card_scarcity": 30,
754
+ "is_mute": 0,
755
+ "width": 1242,
756
+ "height": 1863
757
+ },
758
+ {
759
+ "card_type_id": 614877,
760
+ "card_name": "萨伊·SR",
761
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/b6cdba551ebbbb3769a9722d40f1548947422fdf.png",
762
+ "card_type": 1,
763
+ "card_id_list": null,
764
+ "total_cnt": 0,
765
+ "total_cnt_show": "000000",
766
+ "holding_rate": 0,
767
+ "video_list": null,
768
+ "is_req_detail": 0,
769
+ "card_scarcity": 30,
770
+ "is_mute": 0,
771
+ "width": 1242,
772
+ "height": 1863
773
+ },
774
+ {
775
+ "card_type_id": 614880,
776
+ "card_name": "叶文洁·SR",
777
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/74b49c326f29d0d1cd521df196ed9ecbfcc0dede.png",
778
+ "card_type": 1,
779
+ "card_id_list": null,
780
+ "total_cnt": 0,
781
+ "total_cnt_show": "000000",
782
+ "holding_rate": 0,
783
+ "video_list": null,
784
+ "is_req_detail": 0,
785
+ "card_scarcity": 30,
786
+ "is_mute": 0,
787
+ "width": 1242,
788
+ "height": 1863
789
+ },
790
+ {
791
+ "card_type_id": 614879,
792
+ "card_name": "史强·SR",
793
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/d6a7ff6e4218ed712e7af9f600e33733aa2835ca.png",
794
+ "card_type": 1,
795
+ "card_id_list": null,
796
+ "total_cnt": 0,
797
+ "total_cnt_show": "000000",
798
+ "holding_rate": 0,
799
+ "video_list": null,
800
+ "is_req_detail": 0,
801
+ "card_scarcity": 30,
802
+ "is_mute": 0,
803
+ "width": 1242,
804
+ "height": 1863
805
+ },
806
+ {
807
+ "card_type_id": 614876,
808
+ "card_name": "青铜剑设定·SR",
809
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/48ac5aab1ceb6cc0447fc333f730eadfc1e19f5a.png",
810
+ "card_type": 1,
811
+ "card_id_list": null,
812
+ "total_cnt": 0,
813
+ "total_cnt_show": "000000",
814
+ "holding_rate": 0,
815
+ "video_list": null,
816
+ "is_req_detail": 0,
817
+ "card_scarcity": 30,
818
+ "is_mute": 0,
819
+ "width": 1242,
820
+ "height": 1863
821
+ }
822
+ ]
823
+ },
824
+ {
825
+ "round_index": 2,
826
+ "round_name": "宇宙彩蛋",
827
+ "card_list": [
828
+ {
829
+ "card_type_id": 612825,
830
+ "card_name": "原画概念 · PDC演唱会·SSR",
831
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/ef8ebf74bf3d0fcfbe0cb7a09862b53343c2b2e6.png",
832
+ "card_type": 1,
833
+ "card_id_list": null,
834
+ "total_cnt": 0,
835
+ "total_cnt_show": "000000",
836
+ "holding_rate": 0,
837
+ "video_list": null,
838
+ "is_req_detail": 0,
839
+ "card_scarcity": 40,
840
+ "is_mute": 0,
841
+ "width": 1242,
842
+ "height": 1863
843
+ },
844
+ {
845
+ "card_type_id": 612826,
846
+ "card_name": "原画概念·现场·SSR",
847
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/5c08b827dd8ea10c88ed910867c0700bc28c0275.png",
848
+ "card_type": 1,
849
+ "card_id_list": null,
850
+ "total_cnt": 0,
851
+ "total_cnt_show": "000000",
852
+ "holding_rate": 0,
853
+ "video_list": null,
854
+ "is_req_detail": 0,
855
+ "card_scarcity": 40,
856
+ "is_mute": 0,
857
+ "width": 1242,
858
+ "height": 1863
859
+ },
860
+ {
861
+ "card_type_id": 612823,
862
+ "card_name": "秦始皇·SSR",
863
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/a9feb1fa1c4ddc74a71e314c7c9662a274a0e458.png",
864
+ "card_type": 1,
865
+ "card_id_list": null,
866
+ "total_cnt": 0,
867
+ "total_cnt_show": "000000",
868
+ "holding_rate": 0,
869
+ "video_list": null,
870
+ "is_req_detail": 0,
871
+ "card_scarcity": 40,
872
+ "is_mute": 0,
873
+ "width": 1242,
874
+ "height": 1863
875
+ },
876
+ {
877
+ "card_type_id": 612822,
878
+ "card_name": "气闸舱·SSR",
879
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/84b2da6d5f7ca194d67004c59a8721fb6ecb24c9.png",
880
+ "card_type": 1,
881
+ "card_id_list": null,
882
+ "total_cnt": 0,
883
+ "total_cnt_show": "000000",
884
+ "holding_rate": 0,
885
+ "video_list": null,
886
+ "is_req_detail": 0,
887
+ "card_scarcity": 40,
888
+ "is_mute": 0,
889
+ "width": 1242,
890
+ "height": 1863
891
+ },
892
+ {
893
+ "card_type_id": 612819,
894
+ "card_name": "空间站控制中心·SSR",
895
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/59ac807ae61b005a32d3c62e7509490b0729cb0c.png",
896
+ "card_type": 1,
897
+ "card_id_list": null,
898
+ "total_cnt": 0,
899
+ "total_cnt_show": "000000",
900
+ "holding_rate": 0,
901
+ "video_list": null,
902
+ "is_req_detail": 0,
903
+ "card_scarcity": 40,
904
+ "is_mute": 0,
905
+ "width": 1242,
906
+ "height": 1863
907
+ },
908
+ {
909
+ "card_type_id": 612821,
910
+ "card_name": "墨子的房间·SSR",
911
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/2a90279a8a19f5f732a211faf90850967149c6b8.png",
912
+ "card_type": 1,
913
+ "card_id_list": null,
914
+ "total_cnt": 0,
915
+ "total_cnt_show": "000000",
916
+ "holding_rate": 0,
917
+ "video_list": null,
918
+ "is_req_detail": 0,
919
+ "card_scarcity": 40,
920
+ "is_mute": 0,
921
+ "width": 1242,
922
+ "height": 1863
923
+ },
924
+ {
925
+ "card_type_id": 612818,
926
+ "card_name": "“思维迷宫”·SSR",
927
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/c29b4941ac5679c8579ff9849148894f36aa2cdd.png",
928
+ "card_type": 1,
929
+ "card_id_list": null,
930
+ "total_cnt": 0,
931
+ "total_cnt_show": "000000",
932
+ "holding_rate": 0,
933
+ "video_list": null,
934
+ "is_req_detail": 0,
935
+ "card_scarcity": 40,
936
+ "is_mute": 0,
937
+ "width": 1242,
938
+ "height": 1863
939
+ },
940
+ {
941
+ "card_type_id": 612820,
942
+ "card_name": "罗辑对话智子·SSR",
943
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/ba17088c86df81bc75f95cecb7b4b8f81a4d6430.png",
944
+ "card_type": 1,
945
+ "card_id_list": null,
946
+ "total_cnt": 0,
947
+ "total_cnt_show": "000000",
948
+ "holding_rate": 0,
949
+ "video_list": null,
950
+ "is_req_detail": 0,
951
+ "card_scarcity": 40,
952
+ "is_mute": 0,
953
+ "width": 1242,
954
+ "height": 1863
955
+ },
956
+ {
957
+ "card_type_id": 612824,
958
+ "card_name": "太空电梯·SSR",
959
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/d6ad0ed2ffbe0bb249c7555940d96703d81bfbb6.png",
960
+ "card_type": 1,
961
+ "card_id_list": null,
962
+ "total_cnt": 0,
963
+ "total_cnt_show": "000000",
964
+ "holding_rate": 0,
965
+ "video_list": null,
966
+ "is_req_detail": 0,
967
+ "card_scarcity": 40,
968
+ "is_mute": 0,
969
+ "width": 1242,
970
+ "height": 1863
971
+ }
972
+ ]
973
+ }
974
+ ],
975
+ "icon_handle_type": 2,
976
+ "icon_jump_url": "https://www.bilibili.com/h5/mall/comment/backpack?navhide=1",
977
+ "pre_list": [
978
+ {
979
+ "card_type_id": 617390,
980
+ "card_name": "智子是什么?·R",
981
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/22a6996c9ff0638021e2566374e9d04470fdeb2c.png",
982
+ "card_type": 2,
983
+ "card_id_list": null,
984
+ "total_cnt": 79305,
985
+ "total_cnt_show": "079305",
986
+ "holding_rate": 0,
987
+ "video_list": [
988
+ "https://upos-hz-mirrorakam.akamaized.net/panguxcodeboss/0b/0e/_ff5781b512ef4bc6a63f1f05bfe0e0b-1-152111110023.mp4?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfq9rVEuxTEnE8L5F6VnEsSTx0vkX8fqJeYTj_lta53NCM=&uipk=5&nbs=1&deadline=1673245872&gen=playurlv2&os=akam&oi=1039130983&trid=89110abc72f04086a2158aef39b21c40B&mid=3089593&platform=html5&upsig=11604920535bdb5eecf1449ced3657f8&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&hdnts=exp=1673245872~hmac=4ffa457f2250534fb986ea3cdb4aca0fa8fc74fd3c2b2e857ca89982e725d726&bvc=vod&nettype=0&orderid=0,1&logo=00000000"
989
+ ],
990
+ "is_req_detail": 0,
991
+ "card_scarcity": 20,
992
+ "is_mute": 0,
993
+ "width": 1242,
994
+ "height": 1862
995
+ },
996
+ {
997
+ "card_type_id": 617389,
998
+ "card_name": "丁仪太空实验·R",
999
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/0d4293a5350e41386fbf96210e2b2b4c03736e0c.png",
1000
+ "card_type": 2,
1001
+ "card_id_list": [
1002
+ {
1003
+ "card_id": 18844848518144,
1004
+ "card_no": "CD.010094",
1005
+ "status": 2,
1006
+ "exchange_status": 0,
1007
+ "hash_code": "0x2640b454742dc17e1bc862f990db6b525863b7af9c60751f747691c4be07ad5c",
1008
+ "card_right": {
1009
+ "is_head_pic": 1,
1010
+ "head_pic_expire": 0,
1011
+ "is_banner_bg": 1,
1012
+ "banner_bg_expire": 0
1013
+ },
1014
+ "card_right_show": {
1015
+ "is_head_pic": 1,
1016
+ "head_pic_toast": "",
1017
+ "is_banner_bg": 1,
1018
+ "banner_bg_toast": ""
1019
+ }
1020
+ }
1021
+ ],
1022
+ "total_cnt": 78785,
1023
+ "total_cnt_show": "078785",
1024
+ "holding_rate": 0,
1025
+ "video_list": [
1026
+ "https://upos-hz-mirrorakam.akamaized.net/panguxcodeboss/ab/39/_784f8b81d56f46bfab1df3c7d7939ab-1-152111110023.mp4?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfq9rVEuxTEnE8L5F6VnEsSTx0vkX8fqJeYTj_lta53NCM=&uipk=5&nbs=1&deadline=1673245872&gen=playurlv2&os=akam&oi=1039130983&trid=8689808ba37c4b7e937694106584e496B&mid=3089593&platform=html5&upsig=12e1c16c7c187ccaa60de6553fcededc&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&hdnts=exp=1673245872~hmac=dc47bb2a23651841d6589c8458e9c55294068bd72dae82bbcb783965ea34c46b&bvc=vod&nettype=0&orderid=0,1&logo=00000000"
1027
+ ],
1028
+ "is_req_detail": 0,
1029
+ "card_scarcity": 20,
1030
+ "is_mute": 0,
1031
+ "width": 1242,
1032
+ "height": 1862
1033
+ },
1034
+ {
1035
+ "card_type_id": 617391,
1036
+ "card_name": "我的荣幸·R",
1037
+ "card_img": "https://i0.hdslb.com/bfs/baselabs/84b3ed4e0b8b2b34d82db49ab971f4b435a4bb96.png",
1038
+ "card_type": 2,
1039
+ "card_id_list": null,
1040
+ "total_cnt": 79004,
1041
+ "total_cnt_show": "079004",
1042
+ "holding_rate": 0,
1043
+ "video_list": [
1044
+ "https://upos-hz-mirrorakam.akamaized.net/panguxcodeboss/8b/1a/_4de896082429496289546d510581a8b-1-152111110023.mp4?e=ig8euxZM2rNcNbdlhoNvNC8BqJIzNbfq9rVEuxTEnE8L5F6VnEsSTx0vkX8fqJeYTj_lta53NCM=&uipk=5&nbs=1&deadline=1673245872&gen=playurlv2&os=akam&oi=1039130983&trid=6f3a15ffdd8941f99355210eba227a42B&mid=3089593&platform=html5&upsig=6aeefbe31c054b3a15c12616065ebe52&uparams=e,uipk,nbs,deadline,gen,os,oi,trid,mid,platform&hdnts=exp=1673245872~hmac=cdb42dbf4f07e3e0c71e4059ec7f591c6cf6ac81c09b3655d2c0b5b6665972c7&bvc=vod&nettype=0&orderid=0,1&logo=00000000"
1045
+ ],
1046
+ "is_req_detail": 0,
1047
+ "card_scarcity": 20,
1048
+ "is_mute": 0,
1049
+ "width": 1242,
1050
+ "height": 1862
1051
+ }
1052
+ ]
1053
+ }
1054
+ }
login.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import qrcode
3
+ import time, requests, urllib, hashlib
4
+
5
+
6
+ def tvsign(params, appkey='4409e2ce8ffd12b8', appsec='59b43e04ad6965f34319062b478f83dd'):
7
+ # 为请求参数进行 api 签名
8
+ params.update({'appkey': appkey})
9
+ params = dict(sorted(params.items())) # 重排序参数 key
10
+ query = urllib.parse.urlencode(params) # 序列化参数
11
+ sign = hashlib.md5((query + appsec).encode()).hexdigest() # 计算 api 签名
12
+ params.update({'sign': sign})
13
+ return params
14
+
15
+
16
+ def catch_qr(x):
17
+ # 获取二维码
18
+ login_info = requests.post('https://passport.bilibili.com/x/passport-tv-login/qrcode/auth_code', params=tvsign({
19
+ 'local_id': '0',
20
+ 'ts': int(time.time())
21
+ })).json()
22
+ # 生成二维码
23
+ img = qrcode.make(login_info['data']['url']).get_image().convert("RGB")
24
+ out = np.array(img)
25
+ return out, login_info
26
+
27
+
28
+ def get_uid_key(login_info):
29
+ def catch_code():
30
+ poll_info = requests.post('https://passport.bilibili.com/x/passport-tv-login/qrcode/poll', params=tvsign({
31
+ 'auth_code': login_info['data']['auth_code'],
32
+ 'local_id': '0',
33
+ 'ts': int(time.time())
34
+ })).json()
35
+
36
+ if poll_info['code'] == 0:
37
+ return True, poll_info['data']
38
+
39
+ elif poll_info['code'] == -3:
40
+ raise Exception('API校验密匙错误')
41
+
42
+ elif poll_info['code'] == -400:
43
+ raise Exception('请求错误')
44
+
45
+ elif poll_info['code'] == 86038:
46
+ raise Exception('二维码已失效')
47
+
48
+ elif poll_info['code'] == 86039:
49
+ time.sleep(5)
50
+ return False, {}
51
+ else:
52
+ raise Exception('未知错误')
53
+
54
+ result = False
55
+ login_data = {}
56
+ code = "连接超时"
57
+ attempt = 0
58
+ while not result and attempt < 3:
59
+ try:
60
+ result, login_data = catch_code()
61
+ if result:
62
+ return result, login_data['cookie_info']['cookies'][2]['value'], login_data['token_info'][
63
+ 'access_token'], "成功"
64
+ else:
65
+ time.sleep(1)
66
+ attempt += 1
67
+ except Exception:
68
+ return result, "0", "0", Exception.args[0]
69
+ return result, "0", "0", code
nft.py ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import time
2
+ import json
3
+ from pathlib import Path
4
+ import requests
5
+ from hashlib import md5
6
+ from typing import Union
7
+ from urllib.parse import urlencode
8
+ from requests_toolbelt.multipart.encoder import MultipartEncoder
9
+ import imghdr
10
+
11
+ CARD_INFO_PATH = Path(__file__).parent / "bili.json" # 不要动
12
+
13
+
14
+ class Crypto:
15
+ APPKEY = '4409e2ce8ffd12b8'
16
+ APPSECRET = '59b43e04ad6965f34319062b478f83dd'
17
+
18
+ @staticmethod
19
+ def md5(data: Union[str, bytes]) -> str:
20
+ '''generates md5 hex dump of `str` or `bytes`'''
21
+ if type(data) == str:
22
+ return md5(data.encode()).hexdigest()
23
+ return md5(data).hexdigest()
24
+
25
+ @staticmethod
26
+ def sign(data: Union[str, dict]) -> str:
27
+ '''salted sign funtion for `dict`(converts to qs then parse) & `str`'''
28
+ if isinstance(data, dict):
29
+ _str = urlencode(data)
30
+ elif type(data) != str:
31
+ raise TypeError
32
+ return Crypto.md5(_str + Crypto.APPSECRET)
33
+
34
+
35
+ class SingableDict(dict):
36
+ @property
37
+ def sorted(self):
38
+ '''returns a alphabetically sorted version of `self`'''
39
+ return dict(sorted(self.items()))
40
+
41
+ @property
42
+ def signed(self):
43
+ '''returns our sorted self with calculated `sign` as a new key-value pair at the end'''
44
+ _sorted = self.sorted
45
+ return {**_sorted, 'sign': Crypto.sign(_sorted)}
46
+
47
+
48
+ def get_image_type(file_path):
49
+ with open(file_path, 'rb') as f:
50
+ data = f.read()
51
+ return imghdr.what(None, data)
52
+
53
+
54
+ def upload_image(file_path, ACCESS_KEY):
55
+ url = "https://api.bilibili.com/x/upload/app/image?access_key=" + ACCESS_KEY
56
+
57
+ payload = {'bucket': 'medialist', 'dir': 'nft'}
58
+
59
+ with open(file_path, 'rb') as f:
60
+ type = f'image/{imghdr.what(f)}'
61
+ print(type)
62
+ files = [
63
+ (
64
+ 'file',
65
+ (file_path, f, type),
66
+ )
67
+ ]
68
+ response = requests.request("POST", url, data=payload, files=files)
69
+ print(response.text)
70
+ return response.json()['data']['location']
71
+
72
+
73
+ def get_one_card_id(UID, ACCESS_KEY):
74
+ url = "https://api.bilibili.com/x/vas/nftcard/cardlist"
75
+ params = SingableDict(
76
+ {
77
+ "access_key": ACCESS_KEY,
78
+ "act_id": "14", # 这里默认已经是三体数字藏品卡14,github下载的默认是4,也就是胶囊卡
79
+ "appkey": "4409e2ce8ffd12b8",
80
+ "disable_rcmd": "0",
81
+ "ruid": UID,
82
+ "statistics": "{\"appId\":1,\"platform\":3,\"version\":\"7.9.0\",\"abtest\":\"\"}",
83
+ "ts": int(time.time()),
84
+ }
85
+ ).signed
86
+ response = requests.request("GET", url, params=params)
87
+ data = response.json()
88
+ if data['code'] != 0:
89
+ print(f"获取卡片信息出错,下面是 api 返回:\n{data}")
90
+ return
91
+ # print(data) # 查询已添加无需再填
92
+ with CARD_INFO_PATH.open("w", encoding="utf8") as f:
93
+ json.dump(data, f, indent=4, ensure_ascii=False)
94
+ print(f"已将卡片信息写入 {CARD_INFO_PATH}")
95
+ for round in data['data']['round_list']:
96
+ for card in round['card_list']:
97
+ if card['card_type'] == 1 and card['card_id_list']:
98
+ print(card['card_id_list'][0]['card_id'])
99
+ return card['card_id_list'][0]['card_id']
100
+ print('没有 R 级别胶囊计划的卡片')
101
+ for i in data["data"]["pre_list"]:
102
+ if card_id_list := i.get("card_id_list"):
103
+ for j in card_id_list:
104
+ if card_id := j.get("card_id"):
105
+ print("=================================")
106
+ print(f"找到三体卡 card_id: {card_id}\n这个 id 属于 {i.get('card_name')}")
107
+ print("=================================")
108
+ return card_id
109
+ else:
110
+ print() # 有值的 card_id_list 中没找到 card_id ,可能是没领三体卡吧
111
+ else:
112
+ print() # 卡片信息中没找到有值的 card_id_list ,可能是没有这张三体卡吧
113
+
114
+
115
+ def set_face(card_id, ACCESS_KEY, img_data):
116
+ api = "https://api.bilibili.com/x/member/app/face/digitalKit/update"
117
+ params = SingableDict(
118
+ {
119
+ "access_key": ACCESS_KEY,
120
+ "appkey": "4409e2ce8ffd12b8",
121
+ "build": "7090300",
122
+ "c_locale": "zh_CN",
123
+ "channel": "xiaomi",
124
+ "disable_rcmd": "0",
125
+ "mobi_app": "android",
126
+ "platform": "android",
127
+ "s_locale": "zh_CN",
128
+ "statistics": "{\"appId\":1,\"platform\":3,\"version\":\"7.9.0\",\"abtest\":\"\"}",
129
+ "ts": int(time.time()),
130
+ }
131
+ ).signed
132
+ m = MultipartEncoder(
133
+ fields={
134
+ 'digital_kit_id': str(card_id),
135
+ 'face': ('face', img_data, 'application/octet-stream'),
136
+ }
137
+ )
138
+ headers = {
139
+ "Content-Type": m.content_type,
140
+ }
141
+ response = requests.request("POST", api, data=m, headers=headers, params=params)
142
+ if response.json()['code'] != 0:
143
+ return False, response.json()
144
+ return True, '设置头像成功, 请等待审核'
145
+
146
+
147
+ def up_card(uid, key, img_data):
148
+ UID = int(uid)
149
+ ACCESS_KEY = str(key)
150
+ result = False
151
+ CODE = "超时"
152
+
153
+ card_id = get_one_card_id(UID, ACCESS_KEY) # 根据你所取得的卡card_id进行更改
154
+ if not card_id:
155
+ CODE = "没找到 card_id ,请确认是否已经领取卡片"
156
+ # img_url = upload_image(BG_PATH)
157
+ # set_bg_img(img_url, card_id)
158
+ else:
159
+ result, CODE = set_face(card_id, ACCESS_KEY, img_data)
160
+ return result, CODE
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ numpy
2
+ gradio
3
+ qrcode[pil]
4
+ requests
5
+ requests_toolbelt
6
+ Pillow