wbm error
This commit is contained in:
parent
357dd32caa
commit
001b62c1c8
1 changed files with 35 additions and 29 deletions
|
|
@ -47,8 +47,12 @@ class WBMHandler(BaseHandler):
|
||||||
result["message"] = "Listing is no longer available (404 detected on WBM)."
|
result["message"] = "Listing is no longer available (404 detected on WBM)."
|
||||||
logger.warning(f"[WBM] Permanent fail: {err}")
|
logger.warning(f"[WBM] Permanent fail: {err}")
|
||||||
await page.close()
|
await page.close()
|
||||||
|
await page.close()
|
||||||
return result
|
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
|
# Find and follow the 'Details' link to the detail page
|
||||||
logger.info("[WBM] Looking for 'Details' link to open detail page...")
|
logger.info("[WBM] Looking for 'Details' link to open detail page...")
|
||||||
detail_link = None
|
detail_link = None
|
||||||
|
|
@ -80,6 +84,8 @@ class WBMHandler(BaseHandler):
|
||||||
await detail_link.click()
|
await detail_link.click()
|
||||||
await page.wait_for_load_state("networkidle")
|
await page.wait_for_load_state("networkidle")
|
||||||
await asyncio.sleep(2)
|
await asyncio.sleep(2)
|
||||||
|
else:
|
||||||
|
logger.info("[WBM] Already on detail page, skipping details link search")
|
||||||
|
|
||||||
# Save HTML of detail page for debugging
|
# Save HTML of detail page for debugging
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue