mirror of
https://github.com/SocksPls/hltv-api
synced 2025-04-29 23:23:08 +00:00
Made python3 compatible
This commit is contained in:
parent
c01abc2213
commit
b49abe92fa
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -23,7 +23,7 @@ def getmatches():
|
|||
matchlist = matches.find_all("div", {"class": ["matchListBox", "matchListDateBox"]})
|
||||
for match in matchlist:
|
||||
if match['class'][0] == "matchListDateBox":
|
||||
print "*", match.text
|
||||
print("* " + match.text)
|
||||
else:
|
||||
try:
|
||||
time = match.find("div", {"class": "matchTimeCell"}).text.strip()
|
||||
|
@ -31,7 +31,7 @@ def getmatches():
|
|||
team2 = match.find("div", {"class": "matchTeam2Cell"}).text.strip()
|
||||
print(time + " " + team1 + " vs " + team2)
|
||||
except:
|
||||
print match.text[:7].strip(), match.text[7:-7].strip()
|
||||
print(match.text[:7].strip(), match.text[7:-7].strip())
|
||||
|
||||
if __name__ == "__main__":
|
||||
getmatches()
|
||||
|
|
Loading…
Add table
Reference in a new issue