wbm error

This commit is contained in:
Aron Petau 2026-01-02 11:32:49 +01:00
parent 357dd32caa
commit 001b62c1c8

View file

@ -47,8 +47,12 @@ class WBMHandler(BaseHandler):
result["message"] = "Listing is no longer available (404 detected on WBM)."
logger.warning(f"[WBM] Permanent fail: {err}")
await page.close()
await page.close()
return result
# Check if we're already on the detail page (URL contains '/details/')
current_url = page.url
if '/details/' not in current_url:
# Find and follow the 'Details' link to the detail page
logger.info("[WBM] Looking for 'Details' link to open detail page...")
detail_link = None
@ -80,6 +84,8 @@ class WBMHandler(BaseHandler):
await detail_link.click()
await page.wait_for_load_state("networkidle")
await asyncio.sleep(2)
else:
logger.info("[WBM] Already on detail page, skipping details link search")
# Save HTML of detail page for debugging
try: