From 74d5d5983ed169941a41fed9ede6f68273cff431 Mon Sep 17 00:00:00 2001 From: gigobyte Date: Sun, 20 Sep 2020 22:03:15 +0300 Subject: [PATCH] Fix team id in getTeamRanking --- src/endpoints/getTeamRanking.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/endpoints/getTeamRanking.ts b/src/endpoints/getTeamRanking.ts index 7528fd3d..17c3bd1a 100644 --- a/src/endpoints/getTeamRanking.ts +++ b/src/endpoints/getTeamRanking.ts @@ -2,7 +2,6 @@ import { TeamRanking } from '../models/TeamRanking' import { Team } from '../models/Team' import { HLTVConfig } from '../config' import { fetchPage, toArray } from '../utils/mappers' -import { popSlashSource } from '../utils/parsing' export const getTeamRanking = (config: HLTVConfig) => async ({ year = '', @@ -37,7 +36,7 @@ export const getTeamRanking = (config: HLTVConfig) => async ({ const team: Team = { name: teamEl.find('.name').text(), - id: Number(popSlashSource(teamEl.find('.team-logo img'))) + id: Number(teamEl.find('.moreLink').attr('href')!.split('/')[2]) } const changeText = teamEl.find('.change').text()