diff --git a/api/app.py b/api/app.py index 137e165..8da1a70 100644 --- a/api/app.py +++ b/api/app.py @@ -73,6 +73,7 @@ async def manual_startup(secret: str): ) _highscores = hiscores[-1] logger.info(_highscores) + id = _highscores.get("Player_id") hiscores = pd.DataFrame(hiscores) @@ -81,6 +82,8 @@ async def manual_startup(secret: str): await asyncio.sleep(60) continue + print(hiscores.head(1)) + names = hiscores[["Player_id", "name"]] names = names.rename(columns={"Player_id": "id"}) hiscores = hiscores[[c for c in hiscores.columns if c != "name"]] diff --git a/api/cogs/requests.py b/api/cogs/requests.py index a7d1a32..7ccd9c2 100644 --- a/api/cogs/requests.py +++ b/api/cogs/requests.py @@ -163,7 +163,7 @@ async def get_prediction_data(player_id: int = 0, limit: int = 0): name=scraper_data.player_name, ).model_dump() ) - return data + return hiscores async def post_prediction(data: list[dict]):