chore: GetAny
This commit is contained in:
@@ -149,7 +149,6 @@ def apiSDGB(
|
||||
|
||||
# 处理响应内容
|
||||
responseContentRaw = response.content
|
||||
print(list(responseContentRaw))
|
||||
|
||||
# 先尝试解密
|
||||
try:
|
||||
|
||||
@@ -190,3 +190,10 @@ def generateDebugTestScore():
|
||||
"syncStatus": 4,
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
userId = int(input("userId: "))
|
||||
fishImportToken = input("DivingFish Token: ")
|
||||
|
||||
implUserMusicToDivingFish(userId, fishImportToken)
|
||||
|
||||
24
GetAny.py
Normal file
24
GetAny.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# 获取用户简略预览数据的 API 实现,此 API 无需任何登录即可调取
|
||||
|
||||
import rapidjson as json
|
||||
from API_TitleServer import apiSDGB
|
||||
|
||||
|
||||
def apiGetAny(
|
||||
userId,
|
||||
apiName: str,
|
||||
noLog: bool = False,
|
||||
) -> str:
|
||||
data = json.dumps({"userId": int(userId)})
|
||||
preview_result = apiSDGB(data, apiName, userId, noLog)
|
||||
return preview_result
|
||||
|
||||
|
||||
# CLI 示例
|
||||
if __name__ == "__main__":
|
||||
userId = input("请输入用户 ID:")
|
||||
# userId = testUid8
|
||||
# print(apiGetAny(userId, "GetUserRatingApi"))
|
||||
# print(apiGetAny(userId, "GetUserPreviewApi"))
|
||||
print(apiGetAny(userId, "GetUserCourseApi"))
|
||||
print(apiGetAny(userId, "GetUserExtendApi"))
|
||||
Reference in New Issue
Block a user