feat: add api aggregations

This commit is contained in:
2026-08-08 23:36:19 +05:30
parent 5848cf9ff4
commit c4b537f6cc
13 changed files with 70409 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
# import requests
from datetime import datetime
import json
# response = requests.get(
# "https://hack2skill.com/api/v1/innovator/public/event/public-list?page=1&records=27&isRegistrationOngoing=true",
# headers={
# "User-Agent": (
# "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
# "AppleWebKit/537.36 (KHTML, like Gecko) "
# "Chrome/151.0.0.0 Safari/537.36"
# ),
# },
# )
#
# with open("hack2skill.json", "w", encoding="utf-8") as file:
# file.write(response.text)
with open("hack2skill.json") as file:
hackathons = json.loads(file.read())["data"]
for hackathon in hackathons:
name = hackathon["title"]
reg_end = datetime.fromisoformat(hackathon["registrationEnd"]).date()
print(name)
print(f"Registration End: {reg_end}")
print()