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

Compare commits

...

2 commits

Author SHA1 Message Date
David Silva
197df7ec86
Merge pull request #41 from makusu720/master
Fix issue with calling strptime()
2023-04-14 18:53:16 +02:00
Makuwu
a996ad6174
Fix issue with calling strptime()
This change fixes an issue in the code where the strptime() method was being called without specifying the datetime module.
2023-04-14 18:37:11 +02:00

View file

@ -39,7 +39,7 @@ def _monthNameToNumber(monthName: str):
# by removing the "st" from the day numbers, such as "21st" -> "21"
if monthName == "Augu":
monthName = "August"
return datetime.strptime(monthName, '%B').month
return datetime.datetime.strptime(monthName, '%B').month
def get_parsed_page(url, delay=0.5):
# This fixes a blocked by cloudflare error i've encountered