Improve mobile.de detail parsing
This commit is contained in:
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user