Improve mobile.de detail parsing

This commit is contained in:
qananasikq
2026-08-20 13:13:00 +03:00
parent cb49420bb2
commit be19d29a1d
6 changed files with 238 additions and 106 deletions
+10 -1
View File
@@ -703,7 +703,16 @@ class MobileDeScraper:
images_upserted=images_upserted,
error_summary=str(exc),
)
logger.error("mobile.de sync_search failed: run_id=%s error=%s", run_id, exc, exc_info=True)
status_code = getattr(getattr(exc, "response", None), "status_code", None)
if int(status_code or 0) in {401, 403, 429}:
logger.warning(
"mobile.de sync_search blocked: run_id=%s status=%s error=%s",
run_id,
status_code,
exc,
)
else:
logger.error("mobile.de sync_search failed: run_id=%s error=%s", run_id, exc, exc_info=True)
raise
def sync_detail(self, listing_id: str, *, lane: str = "mobile_de_cars") -> dict[str, Any]: