prod
This commit is contained in:
parent
d596ed7e19
commit
aa6626d80d
21 changed files with 1051 additions and 333 deletions
|
|
@ -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/wbm")
|
||||
DATA_DIR.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
class WBMHandler(BaseHandler):
|
||||
def __init__(self, browser_context):
|
||||
|
|
@ -23,7 +26,7 @@ class WBMHandler(BaseHandler):
|
|||
# Save HTML after modal handling for debugging
|
||||
try:
|
||||
html_content = await page.content()
|
||||
with open("data/wbm_debug.html", "w", encoding="utf-8") as f:
|
||||
with open(DATA_DIR / "wbm_debug.html", "w", encoding="utf-8") as f:
|
||||
f.write(html_content)
|
||||
except Exception as e:
|
||||
logger.warning(f"[WBM] Could not save debug HTML: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue