mirror of
https://github.com/SocksPls/hltv-api
synced 2025-07-12 03:59:15 +00:00
Updated top5teams func for new site layout (rest coming soon)
This commit is contained in:
parent
dd4bece7a7
commit
8f766ba7af
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -11,9 +11,9 @@ def top5teams():
|
|||
home = get_parsed_page("http://hltv.org/")
|
||||
count = 0
|
||||
teams = []
|
||||
for team in home.find_all("div", {"class": "vsbox", })[:5]:
|
||||
for team in home.find_all("div", {"class": ["col-box rank"], }):
|
||||
count += 1
|
||||
teamname = team.find_all("div")[2].text.strip()
|
||||
teamname = team.text[3:]
|
||||
teams.append(teamname)
|
||||
return teams
|
||||
|
||||
|
@ -210,4 +210,4 @@ def get_results():
|
|||
if __name__ == "__main__":
|
||||
import pprint
|
||||
pp = pprint.PrettyPrinter()
|
||||
pp.pprint(get_results())
|
||||
pp.pprint(top5teams())
|
||||
|
|
Loading…
Add table
Reference in a new issue