Added customization for the seat selection.

This commit is contained in:
b267a 2026-01-06 16:55:46 +01:00
parent eef7d24c25
commit 862518a45f
2 changed files with 6 additions and 1 deletions

View file

@ -4,6 +4,7 @@ BOOKING_API_BASE = "https://b.anny.eu/api/v1"
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 = "449"
RESSOURCE_ID = "5993" # None Will be set dynamically if None, else use the given ID
DEFAULT_HEADERS = {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0',

View file

@ -7,6 +7,7 @@ from auth.session import AnnySession
from booking.client import BookingClient
from utils.helpers import get_future_datetime
import pytz
from config.constants import RESSOURCE_ID
def main():
load_dotenv('.env', override=True)
@ -50,7 +51,10 @@ def main():
start = get_future_datetime(hour=time_['start'])
end = get_future_datetime(hour=time_['end'])
resource_id = booking.find_available_resource(start, end)
if RESSOURCE_ID:
resource_id = RESSOURCE_ID
else:
resource_id = booking.find_available_resource(start, end)
if resource_id:
booking.reserve(resource_id, start, end)