From efc874ab9fdcd654538f583944b76c5e19235e19 Mon Sep 17 00:00:00 2001 From: 7a1dd609-d238-4580-9d5f-ee8412b0f5bc <7a1dd609-d238-4580-9d5f-ee8412b0f5bc@bankofchina.com> Date: Sun, 19 Jan 2025 08:45:58 +0800 Subject: [PATCH] add random music data --- .settings.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.settings.py b/.settings.py index 3f5083e..d66806e 100644 --- a/.settings.py +++ b/.settings.py @@ -1,12 +1,19 @@ -# This file contains the config of the whole project. -# DO NOT share your crtical info to others. -# Change the file name from .settings.py to settings.py. +import random + +with open('music.json') as file: + music = json.load(file) -# 上传的乐曲成绩 -# 此成绩将覆盖原有成绩 music_data = ({ - "musicId":834,"level":4,"playCount":10,"achievement":912231,"comboStatus":0,"syncStatus":0,"deluxscoreMax":2106,"scoreRank":5, "extNum1": 0 + "musicId": music[random.randint(0, 500)], + "level": random.randint(0, 3), + "playCount": random.randint(10, 20), + "achievement": random.randint(995000, 1000000), + "comboStatus": random.randint(0, 2), + "syncStatus": 0, + "deluxscoreMax": random.randint(1300, 1500), + "scoreRank": 11, + "extNum1": 0 }) # 机厅信息