Merge branch 'master' of https://github.com/Remik1r3n/maimaiDX-Api
This commit is contained in:
@@ -28,7 +28,7 @@ def auth_lite_decrypt(ciphertext: bytes) -> str:
|
||||
content = decrypted_data[16:] # 去除头部的16字节
|
||||
return content.decode('utf-8').strip()
|
||||
|
||||
def getRawDelivery(title_ver:str="1.50"):
|
||||
def getRawDelivery(title_ver:str="1.51"):
|
||||
encrypted = auth_lite_encrypt(f'title_id=SDGB&title_ver={title_ver}&client_id=A63E01C2805')
|
||||
r = httpx.post(
|
||||
'http://at.sys-allnet.cn/net/delivery/instruction',
|
||||
@@ -120,7 +120,7 @@ def parseUpdateIni(iniText):
|
||||
return final_message
|
||||
|
||||
if __name__ == '__main__':
|
||||
urlList = parseRawDelivery(getRawDelivery("1.40"))
|
||||
urlList = parseRawDelivery(getRawDelivery("1.51"))
|
||||
for url in urlList:
|
||||
iniText = getUpdateIniFromURL(url)
|
||||
message = parseUpdateIni(iniText)
|
||||
|
||||
@@ -19,11 +19,12 @@ def apiUploadUserPlaylog(userId:int, musicDataToBeUploaded, currentUserData2, lo
|
||||
# 构建一个 PlayLog
|
||||
data = json.dumps({
|
||||
"userId": int(userId),
|
||||
"userPlaylog": {
|
||||
"userPlaylogList": [
|
||||
{
|
||||
"userId": 0,
|
||||
"orderId": 0,
|
||||
"playlogId": loginId,
|
||||
"version": 1050000,
|
||||
"version": 1051000,
|
||||
"placeId": placeId,
|
||||
"placeName": placeName,
|
||||
"loginDate": int(time.time()), #似乎和登录timestamp不同
|
||||
@@ -111,13 +112,13 @@ def apiUploadUserPlaylog(userId:int, musicDataToBeUploaded, currentUserData2, lo
|
||||
"comboStatus": 0,
|
||||
"syncStatus": 0,
|
||||
"isClear": False,
|
||||
'beforeRating': currentUserData2['playerRating'],
|
||||
'afterRating': currentUserData2['playerRating'],
|
||||
"beforeRating": currentUserData2['playerRating'],
|
||||
"afterRating": currentUserData2['playerRating'],
|
||||
"beforeGrade": 0,
|
||||
"afterGrade": 0,
|
||||
"afterGradeRank": 1,
|
||||
'beforeDeluxRating': currentUserData2['playerRating'],
|
||||
'afterDeluxRating': currentUserData2['playerRating'],
|
||||
"beforeDeluxRating": currentUserData2['playerRating'],
|
||||
"afterDeluxRating": currentUserData2['playerRating'],
|
||||
"isPlayTutorial": False,
|
||||
"isEventMode": False,
|
||||
"isFreedomMode": False,
|
||||
@@ -127,12 +128,13 @@ def apiUploadUserPlaylog(userId:int, musicDataToBeUploaded, currentUserData2, lo
|
||||
"extNum1": 0,
|
||||
"extNum2": 0,
|
||||
"extNum4": 3020,
|
||||
"extBool1": False
|
||||
"extBool1": False,
|
||||
"extBool2": False
|
||||
}
|
||||
})
|
||||
]
|
||||
})
|
||||
# 发送请求
|
||||
result = apiSDGB(data, "UploadUserPlaylogApi", userId)
|
||||
result = apiSDGB(data, "UploadUserPlaylogListApi", userId)
|
||||
logger.info("上传游玩记录:结果:"+ str(result))
|
||||
# 返回响应
|
||||
return result
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ def generateFullUserAll(userId, currentLoginResult, currentLoginTimestamp, curre
|
||||
def generateUserAllData(userId, currentLoginResult, currentLoginTimestamp, currentUserData2, currentPlaySpecial):
|
||||
"""构建一个非常基础的 UserAll 数据,必须手动填充一些数据"""
|
||||
|
||||
# 我不知道放在哪里好了,你修改一下 TwT
|
||||
currentUserMission = implGetUser_("MissionData", userId, True)
|
||||
|
||||
data = {
|
||||
"userId": userId,
|
||||
"playlogId": currentLoginResult['loginId'],
|
||||
@@ -64,6 +67,8 @@ def generateUserAllData(userId, currentLoginResult, currentLoginTimestamp, curre
|
||||
"accessCode": "",
|
||||
"userName": currentUserData2['userName'],
|
||||
"isNetMember": 1,
|
||||
"point": currentUserData2['point'],
|
||||
"totalPoint": currentUserData2['totalPoint'],
|
||||
"iconId": currentUserData2['iconId'],
|
||||
"plateId": currentUserData2['plateId'],
|
||||
"titleId": currentUserData2['titleId'],
|
||||
@@ -140,6 +145,7 @@ def generateUserAllData(userId, currentLoginResult, currentLoginTimestamp, curre
|
||||
"playerOldRating": currentUserData2['playerOldRating'],
|
||||
"playerNewRating": currentUserData2['playerNewRating'],
|
||||
"banState": 0,
|
||||
"friendRegistSkip": currentUserData2['friendRegistSkip'],
|
||||
"dateTime": currentLoginTimestamp
|
||||
}
|
||||
],
|
||||
@@ -157,10 +163,12 @@ def generateUserAllData(userId, currentLoginResult, currentLoginTimestamp, curre
|
||||
"userChargeList": [], #需要填上
|
||||
"userFavoriteList": [],
|
||||
"userActivityList": [], #需要填上
|
||||
"userMissionDataList": [],
|
||||
"userWeeklyData": currentUserMission['userWeeklyData'],
|
||||
"userGamePlaylogList": [
|
||||
{
|
||||
"playlogId": currentLoginResult['loginId'],
|
||||
"version": "1.50.00",
|
||||
"version": "1.51.00",
|
||||
"playDate": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%Y-%m-%d %H:%M:%S') + '.0',
|
||||
"playMode": 0,
|
||||
"useTicketId": -1,
|
||||
@@ -184,6 +192,12 @@ def generateUserAllData(userId, currentLoginResult, currentLoginTimestamp, curre
|
||||
"placeId": 0,
|
||||
"user2pPlaylogDetailList": []
|
||||
},
|
||||
"userIntimateList": [],
|
||||
"userShopItemStockList": [],
|
||||
"userGetPointList": [],
|
||||
"userTradeItemList": [],
|
||||
"userFavoritemusicList": [],
|
||||
"userKaleidxScopeList": [],
|
||||
"isNewCharacterList": "",
|
||||
"isNewMapList": "",
|
||||
"isNewLoginBonusList": "",
|
||||
@@ -191,7 +205,10 @@ def generateUserAllData(userId, currentLoginResult, currentLoginTimestamp, curre
|
||||
"isNewMusicDetailList": "", #可选但经常要填上
|
||||
"isNewCourseList": "0",
|
||||
"isNewFavoriteList": "",
|
||||
"isNewFriendSeasonRankingList": ""
|
||||
"isNewFriendSeasonRankingList": "",
|
||||
"isNewUserIntimateList": "",
|
||||
"isNewFavoritemusicList": "",
|
||||
"isNewKaleidxScopeList": ""
|
||||
}
|
||||
}
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user