Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
extreme4all committed Sep 7, 2024
1 parent 1ca6d1a commit 5fbbd44
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions api/cogs/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,14 @@ async def get_player_data(label_id: int, limit: int = 5000):
def parse_hs_data(data: list[ScraperDataV3]) -> list[HighscoreData]:
hiscores = []
for d in data:
scraper_data = ScraperDataV3(**d)
skills = {r.skill_name: r.skill_value for r in scraper_data.skills}
activities = {
r.activity_name: r.activity_value for r in scraper_data.activities
}
skills = {r.skill_name: r.skill_value for r in d.skills}
activities = {r.activity_name: r.activity_value for r in d.activities}
hiscores.append(
HighscoreData(
**skills,
**activities,
Player_id=scraper_data.player_id,
name=scraper_data.player_name,
Player_id=d.player_id,
name=d.player_name,
)
)
return hiscores
Expand Down

0 comments on commit 5fbbd44

Please sign in to comment.