mirror of
https://github.com/SocksPls/hltv-api
synced 2025-04-30 23:43:08 +00:00
Merge pull request #12 from zGrav/master
fix(main): get_players uses bodyshot-team now
This commit is contained in:
commit
c1a0f437ac
1 changed files with 3 additions and 2 deletions
5
main.py
5
main.py
|
@ -60,8 +60,9 @@ def get_players(teamid):
|
||||||
page = get_parsed_page("http://www.hltv.org/?pageid=362&teamid=" + teamid)
|
page = get_parsed_page("http://www.hltv.org/?pageid=362&teamid=" + teamid)
|
||||||
titlebox = page.find("div", {"class": "teamProfile"})
|
titlebox = page.find("div", {"class": "teamProfile"})
|
||||||
players = []
|
players = []
|
||||||
for player in titlebox.find_all("div", {"class": "standard-box overlayImageFrame"}):
|
for player in titlebox.find_all("div", {"class": "bodyshot-team"}):
|
||||||
players.append(player.text.strip().encode('utf8'))
|
players = player.text.strip().encode('utf8').split('\n\n\n\n')
|
||||||
|
players = [x.strip(' ') for x in players]
|
||||||
return players
|
return players
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue