Update SFSY.py

This commit is contained in:
CHERWING 2024-05-26 13:10:51 +08:00 committed by GitHub
parent 6fbf71cb97
commit 631f71b636
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

49
SFSY.py
View File

@ -1248,6 +1248,33 @@ class RUN:
print(e) print(e)
return False return False
def DRAGONBOAT_2024_Game_init(self):
Log('====== 开始划龙舟游戏 ======')
try:
payload = {}
url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~dragonBoat2024GameService~init'
response = self.do_request(url, payload)
# print(response)
if response.get('success'):
obj =response.get('obj',[{}])
currentIndex = obj.get('currentIndex','')
ifPassAllLevel = obj.get('ifPassAllLevel','')
if currentIndex != 30:
self.DRAGONBOAT_2024_win(currentIndex)
else:
self.DRAGONBOAT_2024_win(0)
else:
error_message = response.get('errorMessage', '无返回')
if '没有资格参与活动' in error_message:
self.DRAGONBOAT_2024_black = True
Log('会员日任务风控')
return False
except Exception as e:
print(e)
return False
def DRAGONBOAT_2024_weeklyGiftStatus(self): def DRAGONBOAT_2024_weeklyGiftStatus(self):
print('====== 查询每周礼包领取状态 ======') print('====== 查询每周礼包领取状态 ======')
try: try:
@ -1329,7 +1356,7 @@ class RUN:
if self.taskCode: if self.taskCode:
self.DRAGONBOAT_2024_finishTask() self.DRAGONBOAT_2024_finishTask()
if taskType == 'PLAY_ACTIVITY_GAME': if taskType == 'PLAY_ACTIVITY_GAME':
self.DRAGONBOAT_2024_Game_indexInfo() self.DRAGONBOAT_2024_Game_init()
else: else:
error_message = response.get('errorMessage', '无返回') error_message = response.get('errorMessage', '无返回')
if '没有资格参与活动' in error_message: if '没有资格参与活动' in error_message:
@ -1403,11 +1430,7 @@ class RUN:
# print(response) # print(response)
if response.get('success'): if response.get('success'):
obj = response.get('obj',False) obj = response.get('obj',False)
if obj: Log(f'> 完成任务【{self.taskName}】成功')
Log(f'> 完成任务【{self.taskName}】成功')
else:
Log(f'> 完成任务【{self.taskName}】失败')
else: else:
error_message = response.get('errorMessage', '无返回') error_message = response.get('errorMessage', '无返回')
if '没有资格参与活动' in error_message: if '没有资格参与活动' in error_message:
@ -1418,9 +1441,9 @@ class RUN:
def DRAGONBOAT_2024_win(self,level): def DRAGONBOAT_2024_win(self,level):
try: try:
for i in range(level,30): for i in range(level,31):
print(f'开始第【{i+1}】关') print(f'开始第【{i}】关')
payload = {"levelIndex":i+1} payload = {"levelIndex":i}
url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~dragonBoat2024GameService~win' url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~dragonBoat2024GameService~win'
response = self.do_request(url, payload) response = self.do_request(url, payload)
@ -1435,9 +1458,9 @@ class RUN:
print(f'> 获得:【{currency}】x{amount}') print(f'> 获得:【{currency}】x{amount}')
else: else:
print(f'> 本关无奖励') print(f'> 本关无奖励')
random_time =random.randint(10,15) # random_time =random.randint(10,15)
print(f'>> 等待{random_time}秒 <<') # print(f'>> 等待{random_time}秒 <<')
time.sleep(random_time) # time.sleep(random_time)
else: else:
error_message = response.get('errorMessage', '无返回') error_message = response.get('errorMessage', '无返回')
print(error_message) print(error_message)
@ -1488,7 +1511,7 @@ class RUN:
self.DRAGONBOAT_2024_weeklyGiftStatus() self.DRAGONBOAT_2024_weeklyGiftStatus()
self.DRAGONBOAT_2024_coinStatus() self.DRAGONBOAT_2024_coinStatus()
self.DRAGONBOAT_2024_taskList() self.DRAGONBOAT_2024_taskList()
self.DRAGONBOAT_2024_Game_indexInfo() # self.DRAGONBOAT_2024_Game_init()
self.DRAGONBOAT_2024_coinStatus(True) self.DRAGONBOAT_2024_coinStatus(True)
self.sendMsg() self.sendMsg()