forked from tzwsoho/auto_snail_lucky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loader.py
2049 lines (1801 loc) · 158 KB
/
loader.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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
import sys
import json
import time
import frida
import gzip
import base64
import random
import _thread
import requests
import traceback
import functools
import webbrowser
import urllib.parse
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
#################################################################################################################################################
app_version = '3.1.0' # 每次有版本更新时需要用 ssl_tool 重新获取
client_version = '3.8.1.0' # 每次有版本更新时需要用 ssl_tool 重新获取
request_interval = 1 # 每个请求的间隔时间,不要弄太快小心被封
#################################################################################################################################################
device = frida.get_usb_device()
pid = 0
for snail_lucky in device.enumerate_processes():
if snail_lucky.name.find('几羊') >= 0:
pid = snail_lucky.pid
break
if pid == 0:
pid = device.spawn('com.eg.android.AlipayGphone')
device.resume(pid)
# app = device.get_frontmost_application()
# if app is not None:
# pid = app.pid
if pid == 0:
os._exit(0)
print('几羊进程 ID:', pid)
session = device.attach(pid)
with open('index.js') as f:
script = session.create_script(f.read())
#################################################################################################################################################
a = [
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd',
'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
'y', 'z', '+', '/'
]
def c10to64(j):
p = 2 ** 6
c_arr = bytearray(p)
i = p
while 1:
i -= 1
c_arr[i] = ord(a[63 & j])
j = j >> 6
if j == 0:
break
return c_arr.decode('utf-8').strip('\0')
def get_ts():
tm = int(time.time() * 1000)
return c10to64(tm)
# print(get_ts())
#################################################################################################################################################
def alipay_sign(s, operation_type, request_data, ts):
t = {
'operationType': operation_type,
'requestData': base64.b64encode(bytearray(request_data, 'utf-8')).decode('utf-8'),
'ts': ts
}
# print(str(t))
return s.exports.sign_request(t)
def alipay_headers(s, base_info, operation_type, ts, sign):
android_id = s.exports.get_check_android_id()
channel_id = s.exports.get_channel_id()
imei = s.exports.get_imei()
mac = s.exports.get_mac()
workspace_id = s.exports.get_workspace_id()
app_id = s.exports.get_app_id()
version = s.exports.get_version()
product_id = s.exports.get_app_key_from_meta_data()
did = s.exports.get_device_id()
cookie = s.exports.get_cookie()
return {
'platform': base_info['platform'],
'androidid': android_id,
'channelid': channel_id,
'imei': imei,
'token': base_info['token'],
'manufacturer': base_info['manufacturer'],
'userid': base_info['userId'],
'clientversion': base_info['clientVersion'],
'mac': mac,
'clientkey': base_info['clientKey'],
'utdid': base_info['utdid'],
'apdid': base_info['apdid'],
'model': base_info['model'],
'WorkspaceId': workspace_id,
'AppId': app_id,
'Platform': 'ANDROID',
'productVersion': version,
'productId': product_id,
'Version': '2',
'Did': did,
'Operation-Type': operation_type,
'Ts': ts,
'Content-Type': 'application/json',
'Sign': sign,
'signType': '0',
'Cookie': cookie,
'Accept-Language': 'zh-Hans',
'Accept-Encoding': 'gzip',
'Connection': 'Keep-Alive',
'Retryable2': '0',
'Content-Encoding': 'gzip',
'Host': 'snailgw.shulidata.com',
'User-Agent': 'Android_Ant_Client'
}
def build_curl(headers, data):
s = 'curl'
for k, v in headers.items():
if k.find('Content-Encoding') >= 0 or k.find('Accept-Encoding') >= 0:
continue
s += ' -H \'' + str(k) + ': ' + str(v) + '\''
s += ' --data \'' + str(data) + '\' \'https://snailgw.shulidata.com/mgw.htm\''
print('*' * 120, '\n', s, '\n' + '*' * 120)
def alipay_request(headers, data):
url = 'https://snailgw.shulidata.com/mgw.htm'
# build_curl(headers, data)
ret = ''
data = gzip.compress(data.encode('utf-8'))
for _ in range(0, 5):
try:
res = requests.post(url, headers = headers, data = data, verify = False, timeout = 20)
# 每个请求间隔一段时间,避免封号
if request_interval > 0:
time.sleep(request_interval)
ret = res.content.decode('utf-8')
# print('*' * 120, '\n', ret, '\n' + '*' * 120)
return json.loads(ret)
except Exception:
traceback.print_exc()
print('!' * 120, '\n', ret, '\n' + '!' * 120)
time.sleep(1)
return dict()
#################################################################################################################################################
# [{"apdid":"eYOIkqXXI47JWb8cn6D0oxaU6hpIwTEZaRVOVsJYT4PVrbuCEep0RQBG","clientKey":"IBdxM1u3SL","clientVersion":"3.4.0.69","model":"NX563J","platform":"Android","systemSwitchStatus":true,"token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取用户每日签到信息
# {"giftHighestInfo":"本周连开7天得钻石宝箱","giftTodayInfo":"今日签到奖励:铂金宝箱","idem":true,"lastWeekDay":"2021.08.08","levelChange":"0","levelChangeDocument":"成功保级新贵铂金","levelName":" 新贵铂金","memberLevel":"3","myRedPoint":true,"propsGiftBox":{"bizType":"SIGN_IN","divination":{"bizType":"UP_UP","guaCi":"柔顺谦虚","level":"上上卦","name":"升卦","revelation1":"尽情感受今天的美好","revelation2":"今日幸运数字:3","yaoCi":"六四:王用亨于岐山。吉,无咎。"},"expireTime":1628092800000,"giftBoxId":"2021080403185252070","icon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hEECTZv48ecAAAAAAAAAAAAAARQnAQ","level":"3","status":"WAIT_OPEN","tip":"点击可开宝箱哦~","title":"铂金宝箱","type":"PLATINUM"},"signIconList":["https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*6OfuSbxT6gYAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*6OfuSbxT6gYAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*3lZiQaY01DAAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*jSJcTrl8zQUAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*jSJcTrl8zQUAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*jSJcTrl8zQUAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*-BMVT7vLBY8AAAAAAAAAAAAAARQnAQ"],"signRuleUrl":"https://render.alipay.com/p/c/181mt9ik8zxc","success":true,"switchStatus":"OFF","todaySignInGiftLevel":"3","totalQuota":"35000.00","totalSignNum":3,"userType":"OLD_MEMBER"}
def alipay_mobile_aggrbillinfo_user_sign(s):
operation_type = 'alipay.mobile.aggrbillinfo.user.sign'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'model': base_info['model'],
'platform': base_info['platform'],
'systemSwitchStatus': True,
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"apdid":"eYOIkqXXI47JWb8cn6D0oxaU6hpIwTEZaRVOVsJYT4PVrbuCEep0RQBG","clientKey":"s4qNdokoIt","clientVersion":"3.4.0.69","model":"NX563J","platform":"Android","token":"a1a78e5f20ddbe470e108e7f253ef9fd","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取用户限额信息
# {"availableQuota":"35000.00","goldNum":20,"goldNumStr":"20","idem":false,"limitQuota":"6500","success":true,"totalQuota":"35000.00","totalWool":"14000.00","userShowInfoVo":{"avatar":"https://thirdwx.qlogo.cn/mmopen/vi_32/P20nZfsvjEIXSiaciacKbVu4I4GvicK0aWHI8Er1AzBIlj5bUY3krEO8Ia3FeKazLa5eVW00BOyQGnX2rZjvabn5Q/132","cancelRelationFlag":false,"endColor":"#D8B09A","genderLabel":"M","growthScore":"288","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*bLAXRozD7mUAAAAAAAAAAAAAARQnAQ","lotteryLabel":"","memberLevel":"3","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*w8ycQpdQKVAAAAAAAAAAAAAAARQnAQ","nextLevelDocument":"还需1306成长值下周可升级史诗钻石会员","nextLevelGrowthScore":"1594","nickName":"tzw_work","officialLabel":"NORMAL","otherLabel":[],"startColor":"#F9E3D6","userId":"8088025113224702"},"woolFull":false,"woolSpeed":"1.4"}
def alipay_mobile_aggrbillinfo_quota_userinfo(s):
operation_type = 'alipay.mobile.aggrbillinfo.quota.userinfo'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'model': base_info['model'],
'platform': base_info['platform'],
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.4.1.0","idfa":"","platform":"h5","token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取背包里面的卡片列表
# {"idem":false,"propVoList":[{"color":"#FF8025","desc":"小羊产毛速度+0.4/s","icon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*k5fQTYQFLOsAAAAAAAAAAAAAARQnAQ","quantity":1,"status":"UN_USED","title":"产毛加速卡","type":"SHEEP_SPEED_2"},{"color":"#FF4C25","desc":"活动参与次数+1","icon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*bcwzTZ51r20AAAAAAAAAAAAAARQnAQ","quantity":45,"status":"UN_USED","title":"活动次数卡","type":"LOTTERY_VICE_ACTIVITY_1"},{"color":"#FFBB00","desc":"羊毛+1500","icon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*lE-jQYl4YHYAAAAAAAAAAAAAARQnAQ","quantity":3,"status":"UN_USED","title":"羊毛卡","type":"SHEEP_WOOL_2"}],"success":true}
def alipay_mobile_aggrbillinfo_sheep_prop_list(s):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.prop.list'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","cardId":"","clientKey":"IBdxM1u3SL","clientVersion":"3.4.1.0","consumeNum":1,"idfa":"","platform":"h5","token":"46d492d238ce6908915c0f797437bb0d","type":"SHEEP_WOOL_2","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 使用背包里面的卡片
# {"errorCode":"90005","errorMsg":"可用羊毛已满,先去抽个奖再来使用吧~","idem":false,"success":false}
def alipay_mobile_aggrbillinfo_props_card_use(s, consume_num, card_type):
operation_type = 'alipay.mobile.aggrbillinfo.props.card.use'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'cardId': '',
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'consumeNum': consume_num,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'type': card_type,
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.4.1.0","idfa":"","platform":"h5","token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取收羊毛界面信息
# {"availableBottle":0,"availableFodder":332,"availableQuota":"35000.00","availableWool":"14000.00","avatar":"https://thirdwx.qlogo.cn/mmopen/vi_32/P20nZfsvjEIXSiaciacKbVu4I4GvicK0aWHI8Er1AzBIlj5bUY3krEO8Ia3FeKazLa5eVW00BOyQGnX2rZjvabn5Q/132","dynamicUrl":"alipays://platformapi/startapp?appId=2021001152630129&query=publicId%3D2021001107603955","goldNum":20,"hasGold":false,"hasGoldToast":"主人,我挖到了很多金币,有空可以去收取哦~","idem":true,"limitQuota":"6500","limitQuotaBonus":"","limitQuotaBonusExpireSeconds":0,"lookUrl":"alipays://platformapi/startapp?appId=2019112669453030","moodUrl":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*U0QTQLKnTXMAAAAAAAAAAAAAARQnAQ","needFeedTimes":50,"needReceiveSheep":false,"newActivityType":"newcomerTask","nickName":"tzw_work","raiderUrl":"https://render.alipay.com/p/c/1816wmrzl5og","ruleUrl":"https://render.alipay.com/p/c/1816pcztl4n4","sheepMood":"100","sheepStatus":"IDLE","sheepWorkToast":"小羊外出打工赚金币啦\n点我立即召回小羊","success":true,"totalBottle":0,"totalQuota":"25000.00","totalQuotaBonus":"","totalQuotaBonusExpireSeconds":0,"totalWool":"14000.00","totalWoolBonus":"","totalWoolBonusExpireSeconds":0,"userShowInfoVo":{"avatar":"https://thirdwx.qlogo.cn/mmopen/vi_32/P20nZfsvjEIXSiaciacKbVu4I4GvicK0aWHI8Er1AzBIlj5bUY3krEO8Ia3FeKazLa5eVW00BOyQGnX2rZjvabn5Q/132","cancelRelationFlag":false,"endColor":"#D8B09A","genderLabel":"M","growthScore":"288","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*bLAXRozD7mUAAAAAAAAAAAAAARQnAQ","lotteryLabel":"","memberLevel":"3","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*w8ycQpdQKVAAAAAAAAAAAAAAARQnAQ","nextLevelDocument":"还需1306成长值下周可升级史诗钻石会员","nextLevelGrowthScore":"1594","nickName":"tzw_work","officialLabel":"NORMAL","otherLabel":[],"startColor":"#F9E3D6","userId":"8088025113224702"},"userType":"OLD_USER","woolSpeed":1.4,"woolSpeedBonus":"","woolSpeedBonusExpireSeconds":0,"workEndSeconds":0,"workUrl":"alipays://platformapi/startapp?appId=2019112669453030"}
def alipay_mobile_aggrbillinfo_sheep_info(s):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.info'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"Zp2SAUBucQ","clientVersion":"3.2.1.0","idfa":"","platform":"h5","token":"6de0d5333632596ec9c067df2c5627f8","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取收羊毛界面额外信息
# {"acquireFodderTimeStr":"","acquireFodderToast":"点我领8g饲料","availableBottle":20,"hasAcquireFodder":true,"idem":true,"moodPrompt":"OFF","needFeedTimes":49,"rapidFeedingVo":{"bizType":"RAPID_FEEDING","status":"ON"},"sheepTalkVo":{"actionTxt":"","prompt":"羊毛满了,快点击收取吧","switchStatus":true,"title":"快来收羊毛","type":"none","url":""},"success":true,"totalBottle":1000}
def alipay_mobile_aggrbillinfo_sheep_info_extra(s):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.info.extra'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"fO1IrEE4dh","clientVersion":"3.6.1.0","idfa":"","platform":"h5","token":"ff4386454e90ff20a8079b935c260b9b","type":"GUESS_INDEX","userId":"8088028700051259","utdid":"UJDAhJQGS6sDAFIUoLkL8xs6"}]
# 点击喂羊后弹出的按钮
# {"idem":false,"success":true}
def alipay_mobile_aggrbillinfo_sheep_use_card(s, card_type):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.use.card'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'type': card_type,
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.5.1.0","idfa":"","platform":"h5","token":"19a5d2f04e7cb5579df1302682d3747a","userId":"8088027101103706","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 收集羊奶
# {"availableBottle":0,"goldNum":20,"idem":false,"needFeedTimes":50,"success":true,"totalBottle":1000}
def alipay_mobile_aggrbillinfo_sheep_collect_milk(s):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.collectMilk'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.5.1.0","idfa":"","platform":"h5","token":"1a8cfba775c8d44db131d9bbc133c9cb","userId":"8088015060932312","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取羊奶兑换现金的商品列表
# {"activityInfos":[{"activityType":"RANDOM","goldNum":0,"goldStr":"对应100-100000羊奶","iconBackGroupColor":"#FD6561","iconText":"随机提现","money":0,"moneyStr":"0.01-10.00元","priority":1,"showAppWithDrawBtnTxt":false},{"activityType":"WITHDRAW_1000","goldNum":99950,"goldStr":"对应99,950羊奶","iconBackGroupColor":"#FD6561","iconText":"超高人气","money":1000,"moneyStr":"10.00元","priority":2,"showAppWithDrawBtnTxt":false},{"activityType":"WITHDRAW_2000","goldNum":199800,"goldStr":"对应199,800羊奶","iconBackGroupColor":"#FD6561","iconText":"超高人气","money":2000,"moneyStr":"20.00元","priority":3,"showAppWithDrawBtnTxt":false},{"activityType":"WITHDRAW_5000","goldNum":499000,"goldStr":"对应499,000羊奶","iconBackGroupColor":"#BFBFBF","iconText":"秒到账","money":5000,"moneyStr":"50.00元","priority":5,"showAppWithDrawBtnTxt":false},{"activityType":"WITHDRAW_10000","goldNum":998000,"goldStr":"对应998,000羊奶","iconBackGroupColor":"#BFBFBF","iconText":"最划算","money":10000,"moneyStr":"100.00元","priority":6,"showAppWithDrawBtnTxt":false},{"activityType":"WITHDRAW_20000","goldNum":1994000,"goldStr":"对应1994,000羊奶","iconBackGroupColor":"#BFBFBF","iconText":"最划算","money":20000,"moneyStr":"200.00元","priority":7,"showAppWithDrawBtnTxt":false}],"alertText":"xxxxx","appWithDrawBtnTxt":"APP专享","bindAlipayStatus":true,"bindWeixinpayStatus":false,"goldNumStr":"93,920","goldToMoneyStr":"9.39","idem":false,"noBindText":"暂未绑定支付宝账号","sheepMood":"100","sheepMoodCopywriting":"小羊心情值100,心情不错,羊奶很新鲜","sheepMoodPopupsCopywriting":"当心情值<10时,将每天扣减500羊奶;\n经常来看看,每天能提升3心情值,让羊奶不过期","success":true,"typeInfoList":[{"icon":"xxx","name":"支付宝","type":"ALI_PAY"}]}
def alipay_mobile_aggrbillinfo_withdraw_index(s):
operation_type = 'alipay.mobile.aggrbillinfo.withdraw.index'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"activityType":"RANDOM","appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.5.1.0","idfa":"","platform":"h5","token":"1a8cfba775c8d44db131d9bbc133c9cb","userId":"8088015060932312","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx","withdrawType":"ALI_PAY"}]
# 兑换羊奶为现金
# {"errorCode":"0099","errorMsg":"今日随机提现次数用完咯,明日再来试试","idem":false,"success":false}
# {"errInfoList":[{"clickButtonText":"支付宝","clickUrl":"xxx","title":"金额少于最小金额"}],"idem":false,"spendGoldNumStr":"200","status":"SUCC","statusIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*yArvTo0MkTMAAAAAAAAAAAAAARQnAQ","statusText":"提现成功","succButtonText":"去支付宝查看","success":true,"topIcon":"","topText":"金额将提现至您当前账户绑定的支付宝账户上,请注意查收 。","transId":"2021081402203138531","transferTimeStr":"2021-08-14 01:35:23","withdrawMoneyStr":"¥0.02"}
def alipay_mobile_aggrbillinfo_withdraw_withdraw(s, activity_type):
operation_type = 'alipay.mobile.aggrbillinfo.withdraw.withdraw'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'activityType': activity_type,
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
'withdrawType': 'ALI_PAY',
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.5.1.0","idfa":"","platform":"h5","token":"1a8cfba775c8d44db131d9bbc133c9cb","transId":"2021081402203138531","userId":"8088015060932312","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取兑换羊奶结果
# {"errInfoList":[{"clickButtonText":"支付宝","clickUrl":"xxx","title":"金额少于最小金额"}],"idem":false,"spendGoldNumStr":"200","status":"SUCC","statusIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*yArvTo0MkTMAAAAAAAAAAAAAARQnAQ","statusText":"提现成功","succButtonText":"去支付宝查看","success":true,"topIcon":"","topText":"金额将提现至您当前账户绑定的支付宝账户上,请注意查收 。","transId":"2021081402203138531","transferTimeStr":"2021-08-14 01:35:23","withdrawMoneyStr":"¥0.02"}
def alipay_mobile_aggrbillinfo_withdraw_result(s, trans_id):
operation_type = 'alipay.mobile.aggrbillinfo.withdraw.result'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'transId': trans_id,
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.5.1.0","idfa":"","platform":"h5","token":"19a5d2f04e7cb5579df1302682d3747a","userId":"8088027101103706","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 收取羊毛
# {"availableBottle":0,"availableFodder":0,"availableQuota":"20000.00","availableWool":"9890.00","goldNum":0,"hasGold":false,"hasGoldToast":"","idem":true,"limitQuota":"5500","limitQuotaBonus":"","limitQuotaBonusExpireSeconds":0,"needFeedTimes":50,"needReceiveSheep":true,"sheepStatus":"IDLE","sheepTalkVo":{"actionTxt":"去抽奖","extInfo":"{\"appId\":\"60000001\"}","prompt":"羊毛已充足,快去抽 奖吧","switchStatus":true,"title":"羊毛充足快抽奖吧","type":"native","url":""},"sheepWorkToast":"","success":true,"totalBottle":0,"totalQuota":"20000.00","totalQuotaBonus":"","totalQuotaBonusExpireSeconds":0,"totalWool":"12000.00","totalWoolBonus":"","totalWoolBonusExpireSeconds":0,"woolSpeed":1.2,"woolSpeedBonus":"","woolSpeedBonusExpireSeconds":0,"workEndSeconds":0}
def alipay_mobile_aggrbillinfo_sheep_wool_collect(s):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.wool.collect'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.5.1.0","idfa":"","platform":"h5","token":"19a5d2f04e7cb5579df1302682d3747a","userId":"8088027101103706","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 领取饲料弹窗
# {"buttonStr":"去领取","canAcquireFodder":"80","fodderNumStr":"","idem":true,"linkUrl":"wisheep://platformapi/startApp?appId=60000004&activityId=2021080500821414400","needLotteryCountStr":"","status":"CAN_ACQUIRE","success":true}
def alipay_mobile_aggrbillinfo_sheep_fodder_popup(s):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.fodder.popup'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"s4qNdokoIt","clientVersion":"3.4.1.0","idfa":"","platform":"h5","token":"a1a78e5f20ddbe470e108e7f253ef9fd","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取收羊毛界面领饲料任务列表
# {"hasAcquireFodder":true,"icon":"","idem":false,"success":true,"taskList":[{"buttonText":"打卡","clickUrl":"","currentNum":0,"remainTime":0,"sortNum":1,"taskIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*BAXxT4OH7WAAAAAAAAAAAAAAARQnAQ","taskId":100001,"taskJumpType":"CLICK","taskPrizeNum":100,"taskPrizeType":"FODDER","taskStatus":"INIT","taskSubTitle":"每日可以打卡2次 ,每次领100g饲料","taskTitle":"每日打卡领饲料","taskType":"FUNCTION","timeLimit":10,"totalNum":2},{"buttonText":"去看看","clickUrl":"","currentNum":0,"extInfo":"{\"iosCodeId\":\"945970401\",\"androidCodeId\":\"945990692\"}","remainTime":0,"sortNum":2,"taskIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*9RZkQLt0L0gAAAAAAAAAAAAAARQnAQ","taskId":100007,"taskJumpType":"JUMP_AD","taskPrizeNum":500,"taskPrizeType":"FODDER","taskStatus":"INIT","taskSubTitle":"每日可以看3次视频,每次领500g饲料","taskTitle":"每日看视频","taskType":"POWER","timeLimit":10,"totalNum":3},...],"taskTabVo":{"angleTitle":"抽奖领饲料","fodderNumStr":"80","leftButtonText":"去查看","needLotteryCountStr":"6","rightButtonText":"去抽奖","status":"NORMAL","title":"16"},"title":"领饲料"}
def alipay_mobile_aggrbillinfo_sheep_tasklist(s):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.tasklist'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"s4qNdokoIt","clientVersion":"3.4.1.0","idfa":"","platform":"h5","taskId":100008,"token":"a1a78e5f20ddbe470e108e7f253ef9fd","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 完成收羊毛界面任务
# {"idem":false,"remainTime":0,"success":true,"taskPrizeNum":1000,"taskPrizeType":"FODDER","taskStatus":"FINISHED"}
def alipay_mobile_aggrbillinfo_sheep_finishtask(s, task_id):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.finishtask'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'taskId': task_id,
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"s4qNdokoIt","clientVersion":"3.4.1.0","idfa":"","platform":"h5","taskId":100001,"taskPrizeNum":100,"token":"a1a78e5f20ddbe470e108e7f253ef9fd","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 领取收羊毛界面任务奖励
# {"idem":false,"remainTime":0,"success":true}
def alipay_mobile_aggrbillinfo_sheep_taskaward(s, task_id, task_prize_num):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.taskaward'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'platform': 'h5',
'taskId': task_id,
'taskPrizeNum': task_prize_num,
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"s4qNdokoIt","clientVersion":"3.4.1.0","fodderNum":1000,"idfa":"","platform":"h5","token":"a1a78e5f20ddbe470e108e7f253ef9fd","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 喂羊
# 饲料只能为 100 或者 1000
# {"availableBottle":240,"availableFodder":432,"idem":false,"needFeedTimes":38,"success":true,"totalBottle":1000}
def alipay_mobile_aggrbillinfo_sheep_feed(s, fodder_num):
operation_type = 'alipay.mobile.aggrbillinfo.sheep.feed'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'fodderNum': fodder_num,
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.4.1.0","gitBoxId":"2021080403186251470","idfa":"","platform":"h5","token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 开宝箱领取卡片
# {"idem":false,"recommendCards":[{"cardDesc":"羊毛+2000","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*P3MtQZmSnFwAAAAAAAAAAAAAARQnAQ","extDesc":"","level":"3","quantity":1,"status":"UN_USED","title":"羊毛卡","type":"SHEEP_WOOL_3","value":"2000.0","win":false},{"cardDesc":"可抽商品上限+2000元","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*obj3SKojXcEAAAAAAAAAAAAAARQnAQ","extDesc":"","level":"3","quantity":1,"status":"UN_USED","title":"抽奖升值卡","type":"ITEM_PRICE_3","value":"2000.0","win":false},{"cardDesc":"可抽商品上限+2500元","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*En4ERqDhBp4AAAAAAAAAAAAAARQnAQ","extDesc":"","level":"4","quantity":1,"status":"UN_USED","title":"抽奖升值卡","type":"ITEM_PRICE_4","value":"2500.0","win":false},{"cardDesc":"小羊产毛速度+0.4/s","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*k5fQTYQFLOsAAAAAAAAAAAAAARQnAQ","extDesc":"","level":"2","quantity":1,"status":"UN_USED","title":"产毛加速卡","type":"SHEEP_SPEED_2","value":"0.4","win":false},{"cardDesc":"活动参与次数+1","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*bcwzTZ51r20AAAAAAAAAAAAAARQnAQ","cardId":"2021080403118957670","extDesc":"","level":"1","quantity":1,"status":"UN_USED","title":"活动次数卡","type":"LOTTERY_VICE_ACTIVITY_1","value":"1.0","win":true},{"cardDesc":"羊毛+10000","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hA5oSq73i_cAAAAAAAAAAAAAARQnAQ","extDesc":"","level":"4","quantity":1,"status":"UN_USED","title":"羊毛卡","type":"SHEEP_WOOL_4","value":"10000.0","win":false},{"cardDesc":"羊奶+1000","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hBGCSq3V-tcAAAAAAAAAAAAAARQnAQ","extDesc":"","level":"3","quantity":1,"status":"UN_USED","title":"羊奶卡","type":"PRIZE_3","value":"1000.0","win":false},{"cardDesc":"小羊产毛速度+0.6/s","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*qgAbQpW2wKIAAAAAAAAAAAAAARQnAQ","extDesc":"","level":"3","quantity":1,"status":"UN_USED","title":"产毛加速卡","type":"SHEEP_SPEED_3","value":"0.6","win":false},{"cardDesc":"小羊容量+10000","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*PMmmQ60rzpwAAAAAAAAAAAAAARQnAQ","extDesc":"","level":"4","quantity":1,"status":"UN_USED","title":"小羊容量卡","type":"SHEEP_QUOTA_4","value":"10000.0","win":false}],"success":true}
def alipay_mobile_aggrbillinfo_props_gift_box_open(s, box_id):
operation_type = 'alipay.mobile.aggrbillinfo.props.gift.box.open'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'gitBoxId': box_id, # 几羊作者的拼写错误,应为 giftBoxId
'idfa': '',
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"apdid":"eYOIkqXXI47JWb8cn6D0oxaU6hpIwTEZaRVOVsJYT4PVrbuCEep0RQBG","clientKey":"IBdxM1u3SL","clientVersion":"3.4.0.69","model":"NX563J","platform":"Android","token":"","userId":"","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取抽奖大厅分类列表
# {"availableQuota":"20000.00","cateConfs":[{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"6708\"}","title":"推荐"}],"title":"推荐"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3756\"}","title":"百货"}],"title":"百货"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3761\"}","title":"美食"}],"title":"美食"},{"indexTabConfVos":[{"paramStr":"{\"queryWord\": \"手机\"}","title":"手机"}],"title":"手机"},{"indexTabConfVos":[{"paramStr":"{\"queryWord\": \"电脑\"}","title":"电脑"}],"title":"电脑"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3759\"}","title":"家电"}],"title":"家电"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3767\"}","title":"美衣"}],"title":"美衣"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3764\"}","title":"男装"}],"title":"男装"},{"indexTabConfVos":[{"paramStr":"{\"queryWord\": \"饰品\"}","title":"饰品"}],"title":"饰品"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3763\"}","title":"美妆"}],"title":"美妆"},{"indexTabConfVos":[{"paramStr":"{\"queryWord\": \"家纺\"}","title":"家纺"}],"title":"家纺"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3758\"}","title":"家居"}],"title":"家居"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3766\"}","title":"运动"}],"title":"运动"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3760\"}","title":"母婴"}],"title":"母婴"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3765\"}","title":"内衣"}],"title":"内衣"},{"indexTabConfVos":[{"paramStr":"{\"materialId\": \"3762\"}","title":"鞋包"}],"title":"鞋包"},{"indexTabConfVos":[{"paramStr":"{\"queryWord\": \"车饰\"}","title":"车品"}],"title":"车品"}],"categories":[{"materialId":"6708","name":"推荐"},{"favoritesId":"2020738001","materialId":"31539","name":"豪礼"},{"materialId":"3756","name":"热门"},{"materialId":"3761","name":"美食"},{"materialId":"3763","name":"美妆"},{"materialId":"3759","name":"家电"},{"materialId":"3767","name":"美衣"},{"materialId":"3760","name":"母婴"},{"materialId":"3758","name":"家居"},{"materialId":"3762","name":"鞋包"},{"materialId":"3765","name":"内衣"},{"materialId":"3764","name":"男装"},{"materialId":"3766","name":"运动"}],"continueSignNum":"0","duplicateActivityVos":[],"everyLoginQuota":false,"idem":true,"itemVoList":[{"activityId":"2021080500821414400","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"624225931498","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计70.12万人参与抽奖","luckDogText":"已有1人中奖","needPropNum":0,"participateCount":701169,"pictUrl":"https://img.alicdn.com/i3/654143820/O1CN01QMTSrq1e5bfK...
def alipay_mobile_aggrbillinfo_user_sign_list(s):
operation_type = 'alipay.mobile.aggrbillinfo.user.sign.list'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'model': base_info['model'],
'platform': base_info['platform'],
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# cateConfs 字段下为各分类信息
# [{"appName":"","appVersion":"3.1.0","bizType":"GOODS","clientKey":"fO1IrEE4dh","clientVersion":"3.6.1.0","idfa":"","memberUserId":"","pageNo":1,"pageSize":10,"platform":"h5","token":"ff4386454e90ff20a8079b935c260b9b","userId":"8088028700051259","utdid":"UJDAhJQGS6sDAFIUoLkL8xs6"}]
# 获取个人商品收藏列表
# {"activityId":"2021083101028911600","goodsCollectVoList":[{"bizType":"GOODS","expireFlag":false,"favoriteId":"2021083102770984125","goodsSource":"TAOBAO","itemId":"629047439813","itemImage":"https://img.alicdn.com/bao/uploaded/i4/6000000006157/O1CN01YuZ3RI1vLxDLxQ34X_!!6000000006157-0-yinhe.jpg","itemName":"【24期免息】apple /苹果ipad芯片","itemPrice":"6099.00","lotteryUserCount":7854507,"userId":"8088028700051259"},{"bizType":"GOODS","expireFlag":false,"favoriteId":"2021083102769550025","goodsSource":"TAOBAO","itemId":"627255121141","itemImage":"https://img.alicdn.com/bao/uploaded/i2/3079263591/O1CN01lbvcTx1cOiyUbzpyt_!!2-item_pic.png","itemName":"gree /格力kfr-26gw大1匹新空调","itemPrice":"2599.00","lotteryUserCount":7176897,"userId":"8088028700051259"}],"idem":false,"success":true}
def alipay_mobile_aggrbillinfo_goods_querycollect(s, page_no, page_size):
operation_type = 'alipay.mobile.aggrbillinfo.goods.querycollect'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'appName': '',
'appVersion': app_version,
'bizType': 'GOODS',
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'memberUserId': '',
'pageNo': page_no,
'pageSize': page_size,
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"apdid":"eYOIklh0fx+q45vhS42sTIrQW34TfllmX7kMdv1O0/t5LjSljthHIvzQ","bizType":"GOODS","clientKey":"M5QTHP9fUo","clientVersion":"3.8.0.89","goodsSource":"TAOBAO","itemId":"629700240255","model":"NX563J","platform":"Android","token":"5d663e143368c436e06526581fae35ed","userId":"8088015381344935","utdid":"UJDAhJQGS6sDAFIUoLkL8xs6"}]
# 取消商品收藏
# {"favoriteId":"2021083102694116693","idem":false,"newAdd":true,"success":true}
def alipay_mobile_aggrbillinfo_goods_cancelcollect(s, biz_type, goods_source, item_id):
operation_type = 'alipay.mobile.aggrbillinfo.goods.cancelcollect'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'apdid': base_info['apdid'],
'bizType': biz_type,
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'goodsSource': goods_source,
'itemId': item_id,
'model': base_info['model'],
'platform': base_info['platform'],
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"apdid":"eYOIkqXXI47JWb8cn6D0oxaU6hpIwTEZaRVOVsJYT4PVrbuCEep0RQBG","clientKey":"IBdxM1u3SL","clientVersion":"3.4.0.69","model":"NX563J","pageNo":2,"pageSize":20,"paramStr":"{\"materialId\": \"6708\"}","platform":"Android","remainTime":72,"token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 获取抽奖大厅列表
# {"duplicateActivityVos":[{"activityIcon1":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*W9nXSZAfv1QAAAAAAAAAAAAAARQnAQ","activityIcon2":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*bsxbSrx-xmgAAAAAAAAAAAAAARQnAQ","activityName":"千人团进行中","activityStatus":"INIT","activityStatusText":"进行中","activityType":"THOUSAND","backGroupImg":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hzL8RJ-NeSAAAAAAAAAAAAAAARQnAQ","context":"千人组团","currentLocation":true,"dateStr":"今日","endTime":1628071200000,"itemInfoList":[{"groupNum":1300,"pictUrl":"https://cbu01.alicdn.com/img/ibank/O1CN01neVnhF1ri9zEKXR75_!!2208161825664-0-cib.jpg_350x350.jpg"},{"groupNum":1300,"pictUrl":"https://cbu01.alicdn.com/img/ibank/O1CN01aomRpl2JEDM10QjYz_!!2200778929389-0-cib.jpg_350x350.jpg"},{"groupNum":1200,"pictUrl":"https://cbu01.alicdn.com/img/ibank/O1CN01eMsyp41L4iBv2okr4_!!2410081246-0-cib.jpg_350x350.jpg"}],"openTime":1628078400000,"priority":1,"prizeText":"已有197787人中奖","ruleUrl":"https://render.alipay.com/p/c/18357y4lalr4","startTime":1628053200000,"timeStr":"13:00"}],"idem":false,"itemVoList":[{"activityId":"2021080400816262800","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"536454755630","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计608人参与抽奖","needPropNum":0,"participateCount":608,"pictUrl":"https://img.alicdn.com/bao/uploaded/i3/1611893164/O1CN01ClgGJ01ZF9l974Cqu_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"79.00","status":"INIT","title":"㊙赤豪澳洲家庭儿童牛排套餐10刀叉","tmallBrandName":"赤豪食品","volume":22,"whiteImage":"https://img.alicdn.com/bao/uploaded/TB1Av3WOsfpK1RjSZFOSuu6nFXa.jpg_350x350.jpg"},{"activityId":"2021080400816262800","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"545009700223","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计1085人参与抽奖","needPropNum":0,"participateCount":1085,"pictUrl":"https://img.alicdn.com/bao/uploaded/i2/2780830659/O1CN01EGNvay1GjrgeICkdR_!!2780830659.jpg_350x350.jpg","price":0,"salePrice":"16.80","status":"INIT","title":"男士秋裤单...
# param_str 对应 alipay_mobile_aggrbillinfo_user_sign_list 函数返回 cateConfs 字段下 indexTabConfVos 字段下的 paramStr
def alipay_mobile_aggrbillinfo_mall_list(s, page_no, page_size, param_str, remain_time):
operation_type = 'alipay.mobile.aggrbillinfo.mall.list'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'model': base_info['model'],
'pageNo': page_no,
'pageSize': page_size,
'paramStr': param_str,
'platform': base_info['platform'],
'remainTime': remain_time,
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"activityId":"2021101001382735500","apdid":"eYOIklh0fx+q45vhS42sTIrQW34TfllmX7kMdv1O0/t5LjSljthHIvzQ","clientKey":"vQUmtPFmWT","clientVersion":"3.8.0.89","itemId":"625302058801","model":"NX563J","platform":"Android","token":"12500ca8d3dd994f91f8060bc01cd7df","type":"TBK_GOODS","userId":"8088015060932312","utdid":"UJDAhJQGS6sDAFIUoLkL8xs6"}]
# 获取商品信息
# {"activityId":"2021101001382735500","activityIdNew":"2021101001382735500","collect":true,"collectTotal":"1","groupGuideText":"摇一摇手机,自动参与抽奖并组队","guessLikeList":[{"activityId":"2021101001382735500","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"618277350986","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计23.99万人参与抽奖","needPropNum":0,"participateCount":239892,"pictUrl":"https://img.alicdn.com/bao/uploaded/i2/2094630694/O1CN01EfpIOf1Gzta5C2U5U_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"1799.00","status":"INIT","title":"chuwi /驰为hi10x微软笔记本","tmallBrandName":"驰为","volume":11,"whiteImage":"https://img.alicdn.com/bao/uploaded/O1CN01Q2DnQh1HZcRtosSvw_!!6000000000772-0-yinhe.jpg_350x350.jpg"},{"activityId":"2021101001382735500","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"590101402276","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计10.82万人参与抽奖","needPropNum":0,"participateCount":108195,"pictUrl":"https://img.alicdn.com/bao/uploaded/i1/858042828/O1CN01xjjuRN1WlGm8ZdVij_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"1399.00","status":"INIT","title":"【立减120元】华为平板m5青春版","volume":29,"whiteImage":"https://img.alicdn.com/bao/uploaded/TB1IOaOb2zO3e4jSZFxSuuP_FXa.jpg_350x350.jpg"},{"activityId":"2021101001382735500","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"580293140818","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计6.26万人参与抽奖","needPropNum":0,"participateCount":62580,"pictUrl":"https://img.alicdn.com/bao/uploaded/i1/1779341691/O1CN01SzMuiO1OMWSIACvbN_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"1099.00","status":"INIT","title":"【领券立减】华为畅享平板平板ipad","volume":383,"whiteImage":"https://img.alicdn.com/bao/uploaded/TB17usZXUD1gK0jSZFGSuvd3FXa.jpg_350x350.jpg"},{"activityId":"2021101001382735500","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"578582431291","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计14.62万人参与抽奖","needPropNum":0,"participateCount":146168,"pictUrl":"https://img.alicdn.com/bao/uploaded/i1/714625138/O1CN01yUN5uB1npFfwkFQ6V_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"1949.00","status":"INIT","title":"酷比魔方knote x pro平板电脑pc","tmallBrandName":"酷比魔方数码","volume":12,"whiteImage":"https://img.alicdn.com/bao/uploaded/O1CN0110vzQY1ByuUECC1qq_!!15-0-lubanu.jpg_350x350.jpg"},{"activityId":"2021101001382735500","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"610990052308","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计22.81万人参与抽奖","needPropNum":0,"participateCount":228079,"pictUrl":"https://img.alicdn.com/bao/uploaded/i3/2929687796/O1CN01w5btq127ScR5iqsSM_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"3558.00","status":"INIT","title":"jumper /中柏ezpad go平板二合一","volume":16,"whiteImage":"https://img.alicdn.com/bao/uploaded/TB1rQpIC4z1gK0jSZSgSuuvwpXa.jpg_350x350.jpg"},{"activityId":"2021101001382735500","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"644213515633","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计8.77万人参与抽奖","needPropNum":0,"participateCount":87742,"pictUrl":"https://img.alicdn.com/bao/uploaded/i4/2200724907121/O1CN01EwUmDb22TT5pdytEk_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"7899.00","status":"INIT","title":"【新品上市】apple /苹果2021芯片","volume":1,"whiteImage":""},{"activityId":"2021101001382735500","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"610773167083","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计36.77万人参与抽奖","luckDogText":"累计1人中奖","needPropNum":0,"participateCount":367724,"pictUrl":"https://img.alicdn.com/bao/uploaded/i2/1062583331/O1CN01Rskr6e1aTdzlfRXy5_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"1799.00","status":"INIT","title":"【12期免息】平板二合一pc中柏电脑","tmallBrandName":"jumper中柏","volume":103,"whiteImage":"https://img.alicdn.com/bao/uploaded/TB1_83wNkT2gK0jSZFkSuwIQFXa.jpg_350x350.jpg"},{"activityId":"2021101001382735500","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"618747850060","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计4.58万人参与抽奖","needPropNum":0,"participateCount":45804,"pictUrl":"https://img.alicdn.com/bao/uploaded/i3/1062583331/O1CN01VUweQX1aTe02xqxPk_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"1799.00","status":"INIT","title":"【顺丰速发】中柏ezpad go win10 12","tmallBrandName":"jumper中柏","volume":8,"whiteImage":"https://img.alicdn.com/bao/uploaded/TB1SbMGNXP7gK0jSZFjSuw5aXXa.jpg_350x350.jpg"},{"activityId":"2021101001382735500","afterButtonText":"已参与","basePrice":0,"beforeButtonText":"免费抽奖","expireFlag":false,"itemId":"601145139841","itemNum":0,"itemType":"TBK_GOODS","lotteryPersonText":"累计21.24万人参与抽奖","needPropNum":0,"participateCount":212415,"pictUrl":"https://img.alicdn.com/bao/uploaded/i3/1062583331/O1CN0156aXrx1aTdztazLNu_!!0-item_pic.jpg_350x350.jpg","price":0,"salePrice":"999.00","status":"INIT","title":"win10平板二合一系统中柏笔记本","tmallBrandName":"jumper中柏","volume":250,"whiteImage":"https://img.alicdn.com/bao/uploaded/TB1PMxmHEz1gK0jSZLeSuv9kVXa.jpg_350x350.jpg"}],"hasGroup":false,"hasOptional":true,"hasOwn":true,"idem":false,"item":{"discount":"60.93","expireFlag":false,"finalPrice":"2688.07","itemClickUrl":"tbopen://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&source=alimama&bc_fl_src=tunion_vipmedia_sy&h5Url=https%3A%2F%2Fs.click.taobao.com%2Ft%3Fe%3Dm%253D2%2526s%253DeQi8qQle9TBw4vFB6t2Z2ueEDrYVVa64r4ll3HtqqoxyINtkUhsv0JRciOJJ8EnaKhufxa%252Fm4xN8wNSpnfMOYxuOf%252Fc28c7F9HCa%252BmBT5tVCP5SCFWxeqrutGDFC4Ggc1GPduzu4oNoHavl%252FAoKM%252FeqR8u4HK8cuEiM%252FlSG%252FbZRgCI5Fr3At1Lt0mAdwA56Z30DK5CKmFXbGDF1NzTQoPw%253D%253D%26scm%3Dnull%26pvid%3D100_11.14.223.12_53335_3831633876846097903%26app_pvid%3D59590_33.7.235.231_955_1633876846095%26ptl%3DfloorId%3A2836%3BoriginalFloorId%3A2836%3Bpvid%3A100_11.14.223.12_53335_3831633876846097903%3Bapp_pvid%3A59590_33.7.235.231_955_1633876846095%26xId%3D2dAVmZ7KvkPOd21YIHnijyX5dO8KO5xL2O4RO1Eaw40lyvipyNIESRW3PTs9krWRXorFWwyi3nykBF0o2XehzqXfhmgc6RkKqV12rhDn76f9%26union_lens%3DlensId%253AMAPI%25401633876846%25402107ebe7_08cf_17c6aa62624_4039%254001%26relationId%3D2590722717","itemId":"625302058801","itemSource":"淘宝","itemType":"TBK_GOODS","lotteryPersonText":"累计337.07万人参与抽奖","luckDogText":"往期18人中奖","pictUrl":"https://img.alicdn.com/bao/uploaded/i4/2200724907121/O1CN01H8Fk1922TT5uvzmIV_!!0-item_pic.jpg","salePrice":"2749.00","title":"【24期免息】华为平板电脑2021 ipad","whiteImage":""},"itemDetailType":"ALL","itemLotteryJudge":"NORMAL","leftButtonText":"领券购买","leftClickURL":"tbopen://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&source=alimama&bc_fl_src=tunion_vipmedia_sy&h5Url=https%3A%2F%2Fuland.taobao.com%2Fcoupon%2Fedetail%3Fe%3D%252Fi3RA9cp234NfLV8niU3RxrSI%252FOabn6qNg4Gqf8CT4BnmB%252Fzds2ljb1ha%252F84vtgPlr8a8LSO6wI6SO0CnGpJKpU2YvrCJCERCARcrbx6Zw%252BZC%252FtTa4oRES2rYrCt7FoTFKiJWcE6lIHrIYDh7lBWFjwXxvEvpJsre5%252Fu%252FOoF5PqMCnMT66%252B6oWJVd8YI46z4FF6O9STo8Qg7mmMWJDI59WUFFgz3RBVH%26%26app_pvid%3D59590_33.7.235.231_955_1633876846095%26ptl%3DfloorId%3A2836%3Bapp_pvid%3A59590_33.7.235.231_955_1633876846095%3Btpp_pvid%3A100_11.14.223.12_53335_3831633876846097903%26xId%3D2dAVmZ7KvkPOd21YIHnijyX5dO8KO5xL2O4RO1Eaw40lyvipyNIESRW3PTs9krWRXorFWwyi3nykBF0o2XehzqXfhmgc6RkKqV12rhDn76f9%26union_lens%3DlensId%253AMAPI%25401633876846%25402107ebe7_08cf_17c6aa62624_4039%254001%26relationId%3D2590722717","leftSubText":"券后约¥2699.00","lotteryCodeVoList":[{"content":"2749.00","icon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*-mL4SLHkgz0AAAAAAAAAAAAAARQnAQ","lotteryCode":"9253491","originRecordId":"2021101005742133231","source":"OWN","status":"NOT_OPEN"},{"content":"组队","icon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*VAB_SYvBl5sAAAAAAAAAAABkARQnAQ","lotteryCode":"3954065","originRecordId":"2021101005699576407","source":"GROUP","status":"NOT_OPEN","userId":"8088028458106077"}],"lotteryRecord":{"activityId":"2021101001382735500","activityName":"20211010期","canGroup":false,"groupId":"2021101086101626400","item":{"discount":"60.93","expireFlag":false,"finalPrice":"2688.07","itemClickUrl":"https://uland.taobao.com/coupon/edetail?e=%2Fi3RA9cp234NfLV8niU3RxrSI%2FOabn6qNg4Gqf8CT4BnmB%2Fzds2ljb1ha%2F84vtgPlr8a8LSO6wI6SO0CnGpJKpU2YvrCJCERCARcrbx6Zw%2BZC%2FtTa4oRES2rYrCt7FoTFKiJWcE6lIHrIYDh7lBWFjwXxvEvpJsre5%2Fu%2FOoF5PqMCnMT66%2B6oWJVd8YI46z4FF6O9STo8Qg7mmMWJDI59WUFFgz3RBVH&&app_pvid=59590_11.95.156.190_767_1633837678124&ptl=floorId:2836;app_pvid:59590_11.95.156.190_767_1633837678124;tpp_pvid:100_11.178.152.196_48729_8711633837678130411&xId=5QsPaNlJuGUmelVK0Ov7rYc5uUHjBpoKMo0lvqzDCjisaP6mi6HWV0ArLEP4eWhOAjFPnuEAWhnXG1TlfBiA1BVkyqY5OPpCC1Lcurf1UZvR&union_lens=lensId%3AMAPI%401633837678%400b5f9cbe_0b21_17c68507e41_e55b%4001","itemId":"625302058801","itemSource":"淘宝","itemType":"TBK_GOODS","pictUrl":"https://img.alicdn.com/bao/uploaded/i2/2200724907121/O1CN01lH9ZtF22TT5xpnzjg_!!0-item_pic.jpg","salePrice":"2749.00","title":"【24期免息】华为平板电脑2021 ipad","whiteImage":""},"lotteryCode":"9253491","lotteryPartTime":1633837678000,"lotteryRecordId":"2021101005742133231","lotteryType":"MANUAL","status":"GOING"},"lotteryTime":"2021.10.10 11:47:58","lotteryUrl":"https://render.alipay.com/p/c/17zzyfwd4io0","luckyDogCount":18,"openRuleUrl":"https://render.alipay.com/p/c/17ors651cops","openTimeStr":"明日10:00开奖,不要错过大奖哦!","partTotal":"337.07万","participate":true,"quotaUrl":"https://render.alipay.com/p/c/17orqreej6v4","rulePic":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*ZPmrR40j8LUAAAAAAAAAAAAAARQnAQ","success":true,"toast":"再拿一注自选的抽奖 码","userHandleVos":[{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*WfizQoI1pBsAAAAAAAAAAAAADsZ1AA/original?t=104Uv72ZRSPIn6b_fjMH0wAAAABkdcYAAAAA","displayText":"刚刚参与抽奖","nickName":"火红的太阳","userShowInfoVo":{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*WfizQoI1pBsAAAAAAAAAAAAADsZ1AA/original?t=104Uv72ZRSPIn6b_fjMH0wAAAABkdcYAAAAA","cancelRelationFlag":false,"endColor":"#737E9A","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*GtpkRqQBOncAAAAAAAAAAAAAARQnAQ","lotteryLabel":"","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hkKKRpOxZpMAAAAAAAAAAAAAARQnAQ","nickName":"火红的太阳","officialLabel":"NORMAL","startColor":"#B0B8D0","userId":"8088003482532659"}},{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*nOXMRrOdzxYAAAAAAAAAAAAADsZ1AA/original?t=_hStCavDu4yUjf6hESi0iQAAAABkdcYAAAAA","displayText":"1分钟前参与抽奖","nickName":"知财有才","userShowInfoVo":{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*nOXMRrOdzxYAAAAAAAAAAAAADsZ1AA/original?t=_hStCavDu4yUjf6hESi0iQAAAABkdcYAAAAA","cancelRelationFlag":false,"endColor":"#737E9A","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*GtpkRqQBOncAAAAAAAAAAAAAARQnAQ","lotteryLabel":"","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hkKKRpOxZpMAAAAAAAAAAAAAARQnAQ","nickName":"知财有才","officialLabel":"NORMAL","startColor":"#B0B8D0","userId":"8088028429754396"}},{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*ZWq6QpNsqGAAAAAAAAAAAAAADsZ1AA/original?t=sLIBMc6e90SxVa56RVtTvwAAAABkdcYAAAAA","displayText":"1分钟前参与抽奖","nickName":"苍蓝猛兽","userShowInfoVo":{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*ZWq6QpNsqGAAAAAAAAAAAAAADsZ1AA/original?t=sLIBMc6e90SxVa56RVtTvwAAAABkdcYAAAAA","cancelRelationFlag":false,"endColor":"#737E9A","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*GtpkRqQBOncAAAAAAAAAAAAAARQnAQ","lotteryLabel":"","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hkKKRpOxZpMAAAAAAAAAAAAAARQnAQ","nickName":"苍蓝猛兽","officialLabel":"NORMAL","startColor":"#B0B8D0","userId":"8088000267716564"}},{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*eX17SbiUF2AAAAAAAAAAAAAADsZ1AA/original?t=gLigyPyBfmh6ekB3FdNpqQAAAABkdcYAAAAA","displayText":"1分钟前参与抽奖","nickName":"踏实的莴苣","userShowInfoVo":{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*eX17SbiUF2AAAAAAAAAAAAAADsZ1AA/original?t=gLigyPyBfmh6ekB3FdNpqQAAAABkdcYAAAAA","cancelRelationFlag":false,"endColor":"#737E9A","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*GtpkRqQBOncAAAAAAAAAAAAAARQnAQ","lotteryLabel":"","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hkKKRpOxZpMAAAAAAAAAAAAAARQnAQ","nickName":"踏实的莴苣","officialLabel":"NORMAL","startColor":"#B0B8D0","userId":"8088000076276446"}}],"userId":"8088015060932312","userLotteryInfoStatus":"GOING_LOTTERY_OPTIONAL","userShowInfoVo":{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*gzSFSKz7hCwAAAAAAAAAAAAADsZ1AA/original?t=LuzJXOKwb7mlxCCx9sMHDQAAAABkdcYAAAAA","cancelRelationFlag":false,"constellationLabel":"狮子座","endColor":"#737E9A","genderLabel":"M","growthScore":"1803","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*GtpkRqQBOncAAAAAAAAAAAAAARQnAQ","lotteryLabel":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*K7ksSbuhBnEAAAAAAAAAAAAAARQnAQ","memberLevel":"4","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hkKKRpOxZpMAAAAAAAAAAAAAARQnAQ","nextLevelDocument":"恭喜你,下周将保级为史诗钻石会员","nextLevelGrowthScore":"2615","nickName":"tzwsoho","officialLabel":"NORMAL","otherLabel":["85后","广州"],"startColor":"#B0B8D0","userId":"8088015060932312"}}
def alipay_mobile_aggrbillinfo_lottery_info(s, activity_id, item_id, item_type):
operation_type = 'alipay.mobile.aggrbillinfo.lottery.info'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'activityId': activity_id,
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'itemId': item_id,
'model': base_info['model'],
'platform': base_info['platform'],
'token': base_info['token'],
'type': item_type,
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"activityId":"2021080400816262800","apdid":"eYOIkqXXI47JWb8cn6D0oxaU6hpIwTEZaRVOVsJYT4PVrbuCEep0RQBG","clientKey":"IBdxM1u3SL","clientVersion":"3.4.0.69","itemId":"527565445184","lotteryType":"MANUAL","model":"NX563J","platform":"Android","token":"46d492d238ce6908915c0f797437bb0d","type":"TBK_GOODS","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 抽奖大厅抽奖
# {"idem":false,"lotteryCode":"3097296","lotteryRecordId":"2021080404219067270","lotteryStatus":"GOING_LOTTERY","success":true}
def alipay_mobile_aggrbillinfo_lottery_lottery(s, activity_id, item_id, lottery_type, good_type):
operation_type = 'alipay.mobile.aggrbillinfo.lottery.lottery'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'activityId': activity_id,
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'itemId': item_id,
'lotteryType': lottery_type,
'model': base_info['model'],
'platform': base_info['platform'],
'token': base_info['token'],
'type': good_type,
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"apdid":"eYOIkqXXI47JWb8cn6D0oxaU6hpIwTEZaRVOVsJYT4PVrbuCEep0RQBG","clientKey":"IBdxM1u3SL","clientVersion":"3.4.0.69","lotteryId":"2021080404219067270","model":"NX563J","platform":"Android","token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 抽奖大厅抽奖后的摇一摇
# lottery_id 为 alipay_mobile_aggrbillinfo_lottery_lottery 结果里面的 lotteryRecordId
# {"groupQuota":"0.00","groupRecords":[{"activityId":"2021080400816262800","avatar":"https://thirdwx.qlogo.cn/mmopen/vi_32/P20nZfsvjEIXSiaciacKbVu4I4GvicK0aWHI8Er1AzBIlj5bUY3krEO8Ia3FeKazLa5eVW00BOyQGnX2rZjvabn5Q/132","genderLabel":"M","groupRecordId":"2021080404007137870","itemClickUrl":"tbopen://m.taobao.com/tbopen/index.html?action=ali.open.nav&module=h5&source=alimama&bc_fl_src=tunion_vipmedia_sy&h5Url=https%3A%2F%2Fuland.taobao.com%2Fcoupon%2Fedetail%3Fe%3DySOLPQDP7GsNfLV8niU3RxrSI%252FOabn6qNg4Gqf8CT4BnmB%252Fzds2ljTK0xeURgcat6mvTIANPDPY6SO0CnGpJKpU2YvrCJCERCARcrbx6Zw%252BZC%252FtTa4oRES2rYrCt7FoTFKiJWcE6lIHrIYDh7lBWFtyCJA2ajj11yvtiGWy5Te8V%252FVWXG0UTeMjqsMFcqaMK09n1P0j5XaIJP8D1%252BglCLSUzVkkdwsIm%26%26app_pvid%3D59590_33.5.137.212_804_1628067859452%26ptl%3DfloorId%3A2836%3Bapp_pvid%3A59590_33.5.137.212_804_1628067859452%3Btpp_pvid%3A100_11.12.65.5_2390_1861628067859457077%26xId%3DTVWwsT9SmElOomJTP0bwqhb6T3wK7tDjnCAzivKdcoNHsbna3sSNav8z03Kpb83ngLkOv5mjsvEfG49HRTo31eX4ujuLqmJQVlanmhX3cpP%26union_lens%3DlensId%253AMAPI%25401628067859%2540210589d4_088c_17b10680c0c_8e26%254001%26relationId%3D2590722717","itemId":"527565445184","lotteryCode":"3097296","lotteryRecordId":"2021080404219067270","nickName":"tzw_work","otherLabel":[],"pictUrl":"https://img.alicdn.com/bao/uploaded/i2/2362736194/O1CN01EhMuu01vctuz08tEv_!!0-item_pic.jpg","prizeType":"GROUP","salePrice":"18.80","status":"GOING","title":"名师手把手小学生日记周记小学书籍","userId":"8088025113224702","userShowInfoVo":{"avatar":"https://thirdwx.qlogo.cn/mmopen/vi_32/P20nZfsvjEIXSiaciacKbVu4I4GvicK0aWHI8Er1AzBIlj5bUY3krEO8Ia3FeKazLa5eVW00BOyQGnX2rZjvabn5Q/132","cancelRelationFlag":false,"endColor":"#D8B09A","genderLabel":"M","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*bLAXRozD7mUAAAAAAAAAAAAAARQnAQ","lotteryLabel":"","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*w8ycQpdQKVAAAAAAAAAAAAAAARQnAQ","nickName":"tzw_work","officialLabel":"NORMAL","otherLabel":[],"startColor":"#F9E3D6","userId":"8088025113224702"},"whiteImgUrl":"https://img.alicdn.com/bao/uploaded/TB1RXk8X4jaK1RjSZFASuvdLFXa.jpg"}],"groupStatus":"GOING_GROUPED","idem":false,"success":true}
def alipay_mobile_aggrbillinfo_group_yaoyiyao(s, lottery_id):
operation_type = 'alipay.mobile.aggrbillinfo.group.yaoyiyao'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'lotteryId': lottery_id,
'model': base_info['model'],
'platform': base_info['platform'],
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"apdid":"eYOIklh0fx+q45vhS42sTIrQW34TfllmX7kMdv1O0/t5LjSljthHIvzQ","clientKey":"8pVlVjRnHp","clientVersion":"3.11.0.17","lotteryRecordId":"2021120506837266531","model":"NX563J","platform":"Android","token":"a3b86210d39ae4652865c33fee8be62c","userId":"8088015060932312","utdid":"UJDAhJQGS6sDAFIUoLkL8xs6"}]
# 获取抽奖大厅抽奖后的随机自选码
# lottery_id 为 alipay_mobile_aggrbillinfo_lottery_lottery 结果里面的 lotteryRecordId
# {"codeId":"945994526","codeSource":"CHUAN_SHAN_JIA","codeType":"SCREEN","discount":"限时5折","discountGold":300,"idem":false,"lotteryCode":"7007086","oldGold":600,"success":true}
def alipay_mobile_aggrbillinfo_lottery_optional_random(s, lottery_id):
operation_type = 'alipay.mobile.aggrbillinfo.lottery.optional.random'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'lotteryRecordId': lottery_id,
'model': base_info['model'],
'platform': base_info['platform'],
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"apdid":"eYOIklh0fx+q45vhS42sTIrQW34TfllmX7kMdv1O0/t5LjSljthHIvzQ","clientKey":"8pVlVjRnHp","clientVersion":"3.11.0.17","lotteryCode":"7007086","lotteryRecordId":"2021120506837266531","model":"NX563J","paymentType":"AD","platform":"Android","token":"a3b86210d39ae4652865c33fee8be62c","userId":"8088015060932312","utdid":"UJDAhJQGS6sDAFIUoLkL8xs6"}]
# 使用自选码抽奖
# {"idem":false,"success":true}
def alipay_mobile_aggrbillinfo_lottery_optional_payment(s, lottery_code, lottery_id, payment_type):
operation_type = 'alipay.mobile.aggrbillinfo.lottery.optional.payment'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'lotteryCode': lottery_code,
'lotteryRecordId': lottery_id,
'model': base_info['model'],
'paymentType': payment_type,
'platform': base_info['platform'],
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"apdid":"eYOIklh0fx+q45vhS42sTIrQW34TfllmX7kMdv1O0/t5LjSljthHIvzQ","clientKey":"8pVlVjRnHp","clientVersion":"3.11.0.17","lotteryRecordId":"2021120506837266531","model":"NX563J","platform":"Android","token":"a3b86210d39ae4652865c33fee8be62c","userId":"8088015060932312","utdid":"UJDAhJQGS6sDAFIUoLkL8xs6"}]
# 观看自选码广告视频响应
# {"idem":false,"success":true}
def alipay_mobile_aggrbillinfo_lottery_optional_adsence_report(s, lottery_id):
operation_type = 'alipay.mobile.aggrbillinfo.lottery.optional.adsence.report'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'lotteryRecordId': lottery_id,
'model': base_info['model'],
'platform': base_info['platform'],
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"activityType":"THOUSAND","appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.4.1.0","idfa":"","pageNo":1,"pageSize":100,"platform":"h5","token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 组团抽奖活动信息列表
# activity_type 有三种:HUNDREDS - 百人团,THOUSAND - 千人团,TEN_THOUSAND - 万人团
# {"duplicateActivityVos":[{"activityName":"千人团进行中","activityStatus":"INIT","activityStatusText":"进行中","activityType":"THOUSAND","backGroupImg":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*hzL8RJ-NeSAAAAAAAAAAAAAAARQnAQ","currentLocation":true,"dateStr":"今日","endTime":1628071200000,"openTime":1628078400000,"priority":1,"prizeText":"","ruleUrl":"https://render.alipay.com/p/c/18357y4lalr4","startTime":1628053200000,"timeStr":"13:00"},{"activityName":"万人团即将开始","activityStatus":"WAIT_START","activityStatusText":"即将开始","activityType":"TEN_THOUSAND","backGroupImg":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*ftv-SrN3OeQAAAAAAAAAAAAAARQnAQ","currentLocation":false,"dateStr":"今日","endTime":1628092800000,"openTime":1628121600000,"priority":2,"prizeText":"","ruleUrl":"https://render.alipay.com/p/c/1835a10an7cw","startTime":1628071200000,"timeStr":"18:00"},{"activityName":"百人团即将开始","activityStatus":"WAIT_START","activityStatusText":"即将开始","activityType":"HUNDREDS","backGroupImg":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*D-G9RaToQ_EAAAAAAAAAAAAAARQnAQ","currentLocation":false,"dateStr":"明日","endTime":1628139600000,"openTime":1628146800000,"priority":3,"prizeText":"","ruleUrl":"https://render.alipay.com/p/c/18357y4lalr4","startTime":1628092800000,"timeStr":"00:00"}],"idem":false,"indexItemVoList":[{"activityId":"2021080400815764900","basePrice":0,"expireFlag":false,"itemId":"cyb2021073000004132100","itemNum":2000,"itemNumStr":"x2000","itemType":"ONE_SEE_GOODS","needPropNum":1,"pictUrl":"https://cbu01.alicdn.com/img/ibank/O1CN01WPzzUI1V0GVKWmkBu_!!2211032012590-0-cib.jpg_350x350.jpg","price":0,"salePrice":"6.51","title":"抖音同款保湿防晒喷雾150ml","usePropNum":"x1","whiteImage":"https://cbu01.alicdn.com/img/ibank/O1CN01WPzzUI1V0GVKWmkBu_!!2211032012590-0-cib.jpg_350x350.jpg"},{"activityId":"2021080400815764900","basePrice":0,"expireFlag":false,"itemId":"cyb2021060800003597700","itemNum":1300,"itemNumStr":"x1300","itemType":"ONE_SEE_GOODS","luckDogText":"已有5401人中奖","needPropNum":1,"pictUrl":"https://cbu01.alicdn.com/img/ibank/O1CN01fXBiSQ1dhn2AaVbLx_!!2207073863768-0-cib.jpg_350x350.jpg","price":0,"salePrice":"9.89","title":"巧克力脆筒零食238g/盒","usePropNum":"x1","whiteImage":"https://cbu01.alicdn.com/img/ibank/O1CN01fXBiSQ1dhn2AaVbLx_!!2207073863768-0-cib.jpg_350x350.jpg"},{"activityId":"2021080400815764900","basePrice":0,"expireFlag":false,"itemId":"cyb2021072000003838400","itemNum":1300,"itemNumStr":"x1300","itemType":"ONE_SEE_GOODS","needPropNum":1,"pictUrl":"https://cbu01.alicdn.com/img/ibank/O1CN01aomRpl2JEDM10QjYz_!!2200778929389-0-cib.jpg_350x350.jpg","price":0,"salePrice":"9.37","title":"超值口腔清洁十二件套","usePropNum":"x1","whiteImage":"https://cbu01.alicdn.com/img/ibank/O1CN01aomRpl2JEDM10QjYz_!!2200778929389-0-cib.jpg_350x350.jpg"}....,"propsCardVo":{"cardDesc":"活动参与次数+1","cardIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*bcwzTZ51r20AAAAAAAAAAAAAARQnAQ","extDesc":"app用户加成","level":"1","quantity":5,"status":"UN_USED","title":"活动次数卡","type":"LOTTERY_VICE_ACTIVITY_1","value":"1.0","win":true},"success":true,"userPropNum":50}
def alipay_mobile_aggrbillinfo_duplicate_tab(s, activity_type, page_no, page_size):
operation_type = 'alipay.mobile.aggrbillinfo.duplicate.tab'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'activityType': activity_type,
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'pageNo': page_no,
'pageSize': page_size,
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# duplicateActivityVos 为活动列表,activityStatus 为 INIT 的活动为正在进行的活动,activityType 为活动类型
# userPropNum 为剩余抽奖次数
# indexItemVoList 为抽奖信息列表
# [{"activityId":"2021080400815764900","activityType":"THOUSAND","appName":"","appVersion":"3.1.0","clientKey":"IBdxM1u3SL","clientVersion":"3.4.1.0","idfa":"","itemId":"cyb2021031800002214200","itemType":"ONE_SEE_GOODS","platform":"h5","token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 组团抽奖活动状态及剩余抽奖次数
# {"idem":false,"lotteryStatus":"FINISHED","success":true,"userPropNum":49}
def alipay_mobile_aggrbillinfo_duplicate_lottery_status(s, activity_id, activity_type, item_id, item_type):
operation_type = 'alipay.mobile.aggrbillinfo.duplicate.lottery.status'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'activityId': activity_id,
'activityType': activity_type,
'appName': '',
'appVersion': app_version,
'clientKey': base_info['clientKey'],
'clientVersion': client_version,
'idfa': '',
'itemId': item_id,
'itemType': item_type,
'platform': 'h5',
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"activityId":"2021080400815764900","activityType":"THOUSAND","apdid":"eYOIkqXXI47JWb8cn6D0oxaU6hpIwTEZaRVOVsJYT4PVrbuCEep0RQBG","clientKey":"IBdxM1u3SL","clientVersion":"3.4.0.69","itemId":"cyb2021031800002214200","itemType":"ONE_SEE_GOODS","model":"NX563J","platform":"Android","token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 组团抽奖活动抽奖
# 抽奖信息在 alipay_mobile_aggrbillinfo_duplicate_tab 函数返回的 indexItemVoList 字段下面:
'''
{
"indexItemVoList": [
{
"activityId": "2021080400815764900",
"basePrice": 0,
"expireFlag": false,
"itemId": "cyb2021031800002214200",
"itemNum": 1300,
"itemNumStr": "x1300",
"itemType": "ONE_SEE_GOODS",
"luckDogText": "已有11700人中奖",
"needPropNum": 1,
"pictUrl": "https://cbu01.alicdn.com/img/ibank/O1CN01neVnhF1ri9zEKXR75_!!2208161825664-0-cib.jpg_350x350.jpg",
"price": 0,
"salePrice": "9.63",
"title": "几羊定制好运便携餐盒",
"usePropNum": "x1",
"verifyIndexPictUrl": "https://mdn.alipayobjects.com/portal_o2iec2/afts/img/A*BTktQI4Whj8AAAAAAAAAAAAAAQAAAQ/original_350x350.jpg",
"verifyTitle": "几羊定制好运便携餐盒",
"whiteImage": "https://cbu01.alicdn.com/img/ibank/O1CN01neVnhF1ri9zEKXR75_!!2208161825664-0-cib.jpg_350x350.jpg"
},
...
'''
# {"idem":false,"lotteryCode":"3954209","lotteryRecordId":"2021080404226142070","lotteryStatus":"GROUP_UP_ING","success":true}
def alipay_mobile_aggrbillinfo_duplicate_lottery(s, activity_id, activity_type, item_id, item_type):
operation_type = 'alipay.mobile.aggrbillinfo.duplicate.lottery'
base_info = json.loads(s.exports.get_rpc_base_info())
request_data = json.dumps([{
'activityId': activity_id,
'activityType': activity_type,
'apdid': base_info['apdid'],
'clientKey': base_info['clientKey'],
'clientVersion': base_info['clientVersion'],
'itemId': item_id,
'itemType': item_type,
'model': base_info['model'],
'platform': base_info['platform'],
'token': base_info['token'],
'userId': base_info['userId'],
'utdid': base_info['utdid'],
}], separators=(',', ':'))
ts = get_ts()
sign = alipay_sign(s, operation_type, request_data, ts)
# print(sign)
headers = alipay_headers(s, base_info, operation_type, ts, sign)
return alipay_request(headers, request_data)
# [{"activityId":"2021080400815764900","apdid":"eYOIkqXXI47JWb8cn6D0oxaU6hpIwTEZaRVOVsJYT4PVrbuCEep0RQBG","clientKey":"IBdxM1u3SL","clientVersion":"3.4.0.69","lotteryRecordId":"2021080404226142070","model":"NX563J","platform":"Android","token":"46d492d238ce6908915c0f797437bb0d","userId":"8088025113224702","utdid":"UJDJKxiEx1gDAFIUoLkA0uxx"}]
# 组团抽奖活动抽奖后的摇一摇
# lottery_record_id 为 alipay_mobile_aggrbillinfo_duplicate_lottery 函数返回的 lotteryRecordId
# {"groupId":"2021080400106686946","idem":false,"luckyStatus":"GOING","memberTotal":979,"memberVoList":[{"activityId":"2021080400815764900","extInfo":{"itemType":"ONE_SEE_GOODS","itemVolume":"null","itemTitle":"几羊定制好运便携餐盒","city":"Guangzhou","userAvatar":"https://thirdwx.qlogo.cn/mmopen/vi_32/P20nZfsvjEIXSiaciacKbVu4I4GvicK0aWHI8Er1AzBIlj5bUY3krEO8Ia3FeKazLa5eVW00BOyQGnX2rZjvabn5Q/132","activityEnv":"PROD","activityId":"2021080400815764900","needPropNum":"1","memberPrivacy":"OFF","avatarEndColor":"#D8B09A","province":"Guangdong","itemCentPrice":"963","activityOpenTime":"2021-08-04 20:00:00","userNickName":"tzw_work","avatarStartColor":"#F9E3D6","memberLevel":"3","activityName":"20210804期-千人团","itemWhiteImage":"https://cbu01.alicdn.com/img/ibank/O1CN01neVnhF1ri9zEKXR75_!!2208161825664-0-cib.jpg_350x350.jpg","processItemId":"cyb2021031800002214200","userId":"8088025113224702","itemPictUrl":"https://cbu01.alicdn.com/img/ibank/O1CN01neVnhF1ri9zEKXR75_!!2208161825664-0-cib.jpg_350x350.jpg","cybBasePrice":"740","itemId":"cyb2021031800002214200","userUserName":"18529787350","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*w8ycQpdQKVAAAAAAAAAAAAAAARQnAQ","itemSalePrice":"9.63","itemSource":"淘宝","userGender":"男","activityType":"THOUSAND","activityPeriod":"2021-08-04"},"gmtCreate":1628069638000,"gmtGroup":1628069638000,"gmtModified":1628069638000,"groupId":"2021080400106686946","itemId":"cyb2021031800002214200","itemPrice":963,"itemVo":{"centPrice":"963","discount":"0","expireFlag":false,"itemId":"cyb2021031800002214200","itemSource":"淘宝","itemType":"ONE_SEE_GOODS","pictUrl":"https://cbu01.alicdn.com/img/ibank/O1CN01neVnhF1ri9zEKXR75_!!2208161825664-0-cib.jpg_350x350.jpg","salePrice":"9.63","title":"几羊定制好运便携餐盒","whiteImage":"https://cbu01.alicdn.com/img/ibank/O1CN01neVnhF1ri9zEKXR75_!!2208161825664-0-cib.jpg_350x350.jpg"},"lotteryCode":"3954209","lotteryRecordId":"2021080404226142070","memberId":"2021080400250847246","partTimeStr":"刚刚参与抽奖","status":"SUCCESS","type":"THOUSAND","userId":"8088025113224702","userShowInfoVo":{"avatar":"https://thirdwx.qlogo.cn/mmopen/vi_32/P20nZfsvjEIXSiaciacKbVu4I4GvicK0aWHI8Er1AzBIlj5bUY3krEO8Ia3FeKazLa5eVW00BOyQGnX2rZjvabn5Q/132","cancelRelationFlag":false,"endColor":"#D8B09A","genderLabel":"M","growthScore":"288","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*bLAXRozD7mUAAAAAAAAAAAAAARQnAQ","lotteryLabel":"","memberLevel":"3","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*w8ycQpdQKVAAAAAAAAAAAAAAARQnAQ","nextLevelDocument":"还需1306成长值下周可升级史诗钻石会员","nextLevelGrowthScore":"1594","nickName":"tzw_work","officialLabel":"NORMAL","otherLabel":[],"startColor":"#F9E3D6","userId":"8088025113224702"}},{"activityId":"2021080400815764900","extInfo":{"itemType":"ONE_SEE_GOODS","itemVolume":"null","itemTitle":"几羊定制好运便携餐..."lotteryCode":"1575147","lotteryRecordId":"2021080404151011381","memberId":"2021080400201566246","partTimeStr":"5分钟前参与抽奖","status":"SUCCESS","type":"THOUSAND","userId":"8088000067824819","userShowInfoVo":{"avatar":"https://mdn.alipayobjects.com/snail_avatar/afts/img/A*KlAeSpE9loAAAAAAAAAAAAAADsZ1AA/original?t=QMA1g2EjtN3OJIjVtTgY8QAAAABkdcYAAAAA","cancelRelationFlag":false,"endColor":"#D8B09A","genderLabel":"","growthScore":"626","latestMemberLevelIcon":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*bLAXRozD7mUAAAAAAAAAAAAAARQnAQ","lotteryLabel":"https://gw.alipayobjects.com/mdn/rms_5b9989/afts/img/A*K7ksSbuhBnEAAAAAAAAAAAAAARQnAQ","memberLevel":"3","memberLevelIcon":"https://gw.alipayobjects.com/mdn/TinyAppInnovation/afts/img/A*w8ycQpdQKVAAAAAAAAAAAAAAARQnAQ","nextLevelDocument":"还需968成长值下周可升级史诗钻石会员","nextLevelGrowthScore":"1594","nickName":"高大的树木","officialLabel":"NORMAL","otherLabel":[],"startColor":"#F9E3D6","userId":"8088000067824819"}}],"success":true}
def alipay_mobile_aggrbillinfo_duplicate_group_yaoyiyao(s, activity_id, lottery_record_id):