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

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.
This commit is contained in:
Makuwu 2023-04-14 18:37:11 +02:00 committed by GitHub
parent 374c4f1b8e
commit a996ad6174
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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