fix(scrapers): cian_detail — ceiling из offer.building.ceilingHeight, repair из decoration (#1791) #1800

Merged
lekss361 merged 1 commit from feat/cian-detail-field-mapping into main 2026-06-19 17:07:15 +00:00
Owner

Closes #1791 (частично — см. NB про прокси).

Корень (проверено на 3 реальных карточках)

  • ceiling_height: в offer.building.ceilingHeight (3.0/2.68/2.7). Код читал offer.ceilingHeight = всегда null → 0% покрытия. Фикс: building.ceilingHeight + fallback.
  • repair: структурное значение в offer.decoration (preFine/euro); offer.repairType часто пуст. Фикс: repairType or decoration + preFine→needs_repair (camelCase .lower() fallback в нормализаторе).
  • kitchen_area_m2 / description: пути offer.kitchenArea/offer.description уже верные.

ВАЖНО — kitchen/descr 3% это НЕ маппинг, а мёртвые прокси

kitchen/description на правильных путях. Их 3% покрытие = доля успешных detail-фетчей. Причина: CIAN_PROXY_URL (socks5) таймаутит, BROWSER_PROXY_CIAN → 503 — detail-энричмент почти не доходит до парса. Этот PR гарантирует, что КОГДА detail отрабатывает — ceiling/repair извлекаются. Полное покрытие kitchen/descr вернётся после починки прокси (отдельный issue).

Тесты

85 passed (cian_detail + normalizer), fixture-регресс: ceiling==3.0, kitchen==14.5, descr>50. (1 pre-existing fail в test_cian_valuation — вне scope, файл не в diff.)

На ревью

  • Фикстура cian_flat_330982715.html (127KB, обрезана до offer-card блока).
  • preFine→needs_repair маппинг — корректна ли семантика (предчистовая = под ремонт).
Closes #1791 (частично — см. NB про прокси). ## Корень (проверено на 3 реальных карточках) - **ceiling_height**: в `offer.building.ceilingHeight` (3.0/2.68/2.7). Код читал `offer.ceilingHeight` = **всегда null** → 0% покрытия. Фикс: `building.ceilingHeight` + fallback. - **repair**: структурное значение в `offer.decoration` (`preFine`/`euro`); `offer.repairType` часто пуст. Фикс: `repairType or decoration` + `preFine→needs_repair` (camelCase `.lower()` fallback в нормализаторе). - **kitchen_area_m2** / **description**: пути `offer.kitchenArea`/`offer.description` уже верные. ## ВАЖНО — kitchen/descr 3% это НЕ маппинг, а мёртвые прокси kitchen/description на правильных путях. Их 3% покрытие = доля успешных detail-фетчей. Причина: **CIAN_PROXY_URL (socks5) таймаутит, BROWSER_PROXY_CIAN → 503** — detail-энричмент почти не доходит до парса. Этот PR гарантирует, что КОГДА detail отрабатывает — ceiling/repair извлекаются. Полное покрытие kitchen/descr вернётся после починки прокси (отдельный issue). ## Тесты 85 passed (cian_detail + normalizer), fixture-регресс: ceiling==3.0, kitchen==14.5, descr>50. (1 pre-existing fail в `test_cian_valuation` — вне scope, файл не в diff.) ## На ревью - Фикстура `cian_flat_330982715.html` (127KB, обрезана до offer-card блока). - `preFine→needs_repair` маппинг — корректна ли семантика (предчистовая = под ремонт).
lekss361 added 1 commit 2026-06-19 16:58:52 +00:00
fix(scrapers): cian_detail — ceiling/repair актуальные пути state (#1791)
All checks were successful
CI / changes (pull_request) Successful in 5s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
2d3ca78b0b
ceiling_height на detail-странице лежит в offer.building.ceilingHeight,
а не offer.ceilingHeight (всегда null) → было 0% покрытия. repairType
часто пустой, структурное значение приходит как offer.decoration
('preFine'/...) — читаем оба + добавлен preFine->needs_repair и
case-insensitive lookup в нормализаторе. kitchen/description пути уже
верны (offer.kitchenArea/offer.description) — низкое покрытие = мёртвый
CIAN_PROXY_URL, не маппинг. Регресс-тест на реальной карточке 330982715.
lekss361 merged commit 2e3291abc9 into main 2026-06-19 17:07:15 +00:00
lekss361 deleted branch feat/cian-detail-field-mapping 2026-06-19 17:07:15 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#1800
No description provided.