From 0c86901ab55c5bc3c7bfcf3295328d8f456791b4 Mon Sep 17 00:00:00 2001 From: i Date: Thu, 5 Feb 2026 15:20:59 +0100 Subject: [PATCH] w --- .gitignore | 3 ++- config/constants.py | 44 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index eeb365b..a3d2319 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.idea *.env *pyc -__pycache__/ \ No newline at end of file +__pycache__/ +venv \ No newline at end of file diff --git a/config/constants.py b/config/constants.py index 054a594..7997845 100644 --- a/config/constants.py +++ b/config/constants.py @@ -5,8 +5,11 @@ CHECKOUT_FORM_API = "https://b.anny.eu/api/ui/checkout-form" RESOURCE_URL = f"{BOOKING_API_BASE}/resources/1-lehrbuchsammlung-eg-und-1-og/children" SERVICE_ID = "601" # SERVICE_ID = "449" -RESOURCE_ID = None # "5957" # Will be set dynamically if None, else use the given ID -RESOURCE_ID =15994 +#RESOURCE_ID = None # "5957" # Will be set dynamically if None, else use the given ID +#RESOURCE_ID =15994 +RESOURCE_ID =15502 #17 best +#RESOURCE_ID =15883 #66 second best +#RESOURCE_ID =16264 TIMEZONE = "Europe/Berlin" # SSO_PROVIDER = "kit" # Available: kit (add more in auth/providers/) SSO_PROVIDER = "tum" # Available: kit (add more in auth/providers/) @@ -18,11 +21,39 @@ DEFAULT_HEADERS = { } # Booking time slots (in order of priority) + +# INFO: BOOKING RULES +# Booking quota: 40 hours per week. +# Each booking reduces the quota by the number of hours reserved. +# The quota resets every Monday at midnight. Unused hours do not carry over to the following week. +# EXPIRY: After 30 minutes, if you do not show up or fail to check in. -> i think doesnt matter cuz i can check in and leave without checkingout lol +# Check-in must be completed within 30 minutes after the start time of your reservation; otherwise, the resource will automatically become available for booking again in the reservation system. +# +- this means i can snipe unused spots daily + + +# best booking time: +# 1. 12-22 -> why? -> because at 22 there will be free seats fs AND at 12 i will be awake for sure maybe 13 would be even better. +# i have only 40/7=5.7 per day SO -> 12-17:30 is best? + BOOKING_TIMES = [ - { - 'start': '08:00:00', - 'end': '09:00:00' - }, + # SNIPE +# { +# 'start': '13:00:00', +# 'end': '18:00:00' +# }, + # BEST +# { +# 'start': '12:00:00', +# 'end': '22:00:00' +# }, + # OPTIMAL + # 40/7=5.7 + { + 'start': '12:00:00', + 'end': '17:30:00' + }, + + # { # 'start': '12:00:00', # 'end': '22:00:00' @@ -40,4 +71,3 @@ BOOKING_TIMES = [ # 'start': '20:00:00', # 'end': '23:45:00' # }, -] \ No newline at end of file