fully implemented project

This commit is contained in:
2026-01-22 19:17:50 +01:00
parent aea6950bfe
commit 42d2758ba5
11 changed files with 220 additions and 5 deletions

18
app/grabber.py Normal file
View File

@@ -0,0 +1,18 @@
from ics import Calendar
import requests
import logger
def grab_calendar(ics_url: str):
response = requests.get(ics_url)
if response.status_code != 200:
logger.warning("Unable to fetch calendar")
return None
try:
calendar = Calendar(response.text)
except Exception:
logger.warning("Unable to parse calendar")
return None
return calendar