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

Merge pull request #35 from aca19lj/dateFormatFix

handels "st" "nd" and "rd"
This commit is contained in:
David Silva 2022-07-26 14:37:04 +02:00 committed by GitHub
commit afcc295576
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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])
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()