1
0
Fork 0
mirror of https://github.com/SocksPls/hltv-api synced 2025-04-30 07:33:09 +00:00

handels "st" "nd" and "rd"

This commit is contained in:
Luke Jones 2022-07-26 13:34:08 +01:00
parent 68ed4126be
commit aba413bec2

View file

@ -276,7 +276,7 @@ def get_results():
resultObj['match-id'] = converters.to_int(res.find("a", {"class": "a-reset"}).get("href").split("/")[-2]) resultObj['match-id'] = converters.to_int(res.find("a", {"class": "a-reset"}).get("href").split("/")[-2])
if (res.parent.find("span", {"class": "standard-headline"})): if (res.parent.find("span", {"class": "standard-headline"})):
dateText = res.parent.find("span", {"class": "standard-headline"}).text.replace("Results for ", "").replace("th", "") dateText = res.parent.find("span", {"class": "standard-headline"}).text.replace("Results for ", "").replace("th", "").replace("rd","").replace("st","").replace("nd","")
dateArr = dateText.split() dateArr = dateText.split()