1
0
Fork 0
mirror of https://github.com/SocksPls/hltv-api synced 2025-04-29 23:23:08 +00:00

Adds URL to get_matches()

Allows you to get matchid/match page url info out of the API for upcoming matches
This commit is contained in:
grantephross 2022-05-28 00:41:52 -05:00 committed by GitHub
parent b2c500015b
commit 1ce33609cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -232,6 +232,7 @@ def get_matches():
matchObj = {}
matchObj['date'] = date
matchObj['url'] = match.find("a", {"class": "match a-reset"}).get("href")
matchObj['time'] = getMatch.find("div", {"class": "matchTime"}).text
if getMatch.find("div", {"class": "matchEvent"}):
matchObj['event'] = getMatch.find("div", {"class": "matchEvent"}).text.encode('utf8').strip()