mirror of
https://github.com/Remik1r3n/maimaiDX-Api.git
synced 2025-05-20 04:17:28 +08:00
Ability to check ImportToken Vaild
This commit is contained in:
parent
16ab36c45f
commit
51bbec3857
@ -89,6 +89,15 @@ def maimaiUserMusicDetailToDivingFish(userMusicDetailList: list) -> list:
|
||||
logger.error(f"Error: {currentMusicDetail}")
|
||||
return divingFishList
|
||||
|
||||
def isVaildFishToken(importToken:str):
|
||||
'''通过尝试获取一次成绩,检查水鱼查分器的 Token 是否有效
|
||||
有效返回 True,无效返回 False'''
|
||||
result = apiDivingFish('GET', '/player/records', importToken)
|
||||
logger.debug(f"水鱼查分器 Token 检查结果:{result}")
|
||||
if result == False:
|
||||
return False
|
||||
return True
|
||||
|
||||
if __name__ == '__main__':
|
||||
if True:
|
||||
userId = testUid
|
||||
|
Loading…
x
Reference in New Issue
Block a user