diff --git a/libs/GetSubGachaId.py b/libs/GetSubGachaId.py index 5d10d87..45fc9ef 100644 --- a/libs/GetSubGachaId.py +++ b/libs/GetSubGachaId.py @@ -8,10 +8,15 @@ def GetGachaSubIdFP(region): response = requests.get(f"https://git.atlasacademy.io/atlasacademy/fgo-game-data/raw/branch/{region}/master/mstGachaSub.json"); gachaList = json.loads(response.text) timeNow = GetTimeStamp() - + priority = 0 + goodGacha = {} for gacha in gachaList: openedAt = gacha["openedAt"] closedAt = gacha["closedAt"] if openedAt <= timeNow & timeNow <= closedAt: - return str(gacha["id"]) \ No newline at end of file + p = int(gacha["priority"]) + if(p > priority): + priority = p + goodGacha = gacha + return str(goodGacha["id"]) \ No newline at end of file