This commit is contained in:
Aron Petau 2026-01-01 15:27:25 +01:00
parent d596ed7e19
commit aa6626d80d
21 changed files with 1051 additions and 333 deletions

View file

@ -1,8 +1,11 @@
from .base_handler import BaseHandler
import logging
import asyncio
from pathlib import Path
logger = logging.getLogger(__name__)
DATA_DIR = Path("data/gewobag")
DATA_DIR.mkdir(parents=True, exist_ok=True)
class GewobagHandler(BaseHandler):
def __init__(self, browser_context):
@ -33,7 +36,7 @@ class GewobagHandler(BaseHandler):
# Save HTML after modal handling for debugging
try:
html_content = await page.content()
with open("data/gewobag_debug.html", "w", encoding="utf-8") as f:
with open(DATA_DIR / "gewobag_debug.html", "w", encoding="utf-8") as f:
f.write(html_content)
except Exception as e:
logger.warning(f"[GEWOBAG] Could not save debug HTML: {e}")