mirror of
https://github.com/SocksPls/hltv-api
synced 2025-04-30 07:33:09 +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"]})
|
matchlist = matches.find_all("div", {"class": ["matchListBox", "matchListDateBox"]})
|
||||||
for match in matchlist:
|
for match in matchlist:
|
||||||
if match['class'][0] == "matchListDateBox":
|
if match['class'][0] == "matchListDateBox":
|
||||||
print "*", match.text
|
print("* " + match.text)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
time = match.find("div", {"class": "matchTimeCell"}).text.strip()
|
time = match.find("div", {"class": "matchTimeCell"}).text.strip()
|
||||||
|
@ -31,7 +31,7 @@ def getmatches():
|
||||||
team2 = match.find("div", {"class": "matchTeam2Cell"}).text.strip()
|
team2 = match.find("div", {"class": "matchTeam2Cell"}).text.strip()
|
||||||
print(time + " " + team1 + " vs " + team2)
|
print(time + " " + team1 + " vs " + team2)
|
||||||
except:
|
except:
|
||||||
print match.text[:7].strip(), match.text[7:-7].strip()
|
print(match.text[:7].strip(), match.text[7:-7].strip())
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
getmatches()
|
getmatches()
|
||||||
|
|
Loading…
Add table
Reference in a new issue