From 2889936ebb5f454e505fb638f9de975c1f2f6bef Mon Sep 17 00:00:00 2001 From: David Silva Date: Thu, 14 Jul 2022 13:45:15 +0200 Subject: [PATCH] feat(main): missing / --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index c591ead..8b34f37 100644 --- a/main.py +++ b/main.py @@ -69,7 +69,8 @@ def top30teams(): 'rank': converters.to_int(team.select('.position')[0].text.strip(), regexp=True), 'rank-points': converters.to_int(team.find('span', {'class': 'points'}).text, regexp=True), 'team-id': converters.to_int(team.find('a', {'class': 'details moreLink'})['href'].split('/')[-1]), - 'url': "https://www.hltv.org" + team.find('a', {'class': 'details moreLink'})['href'], + 'team-url': "https://hltv.org/team/" + team.find('a', {'class': 'details moreLink'})['href'].split('/')[-1] + "/" + team.find('div', {"class": "ranking-header"}).select('.name')[0].text.strip(), + 'stats-url': "https://www.hltv.org" + team.find('a', {'class': 'details moreLink'})['href'], 'team-players': []} for player_div in team.find_all("td", {"class": "player-holder"}): player = {} @@ -177,7 +178,7 @@ def _get_historical_lineup(player_anchors): player['name'] = buildName[0].rstrip() + buildName[2] player['nickname'] = player_anchor.find("div", {"class": "teammate-info standard-box"}).find("div", {"class": "text-ellipsis"}).text player['maps-played'] = int(re.search(r'\d+', player_anchor.find("div", {"class": "teammate-info standard-box"}).find("span").text).group()) - player['url'] = player_anchor.find("div", {"class": "teammate-info standard-box"}).find("a").get("href") + player['url'] = "https://hltv.org" + player_anchor.find("div", {"class": "teammate-info standard-box"}).find("a").get("href") players.append(player) return players