gendesign/tradein-mvp/backend
lekss361 fda9ae4dc1 feat(tradein): yandex_valuation.py — anonymous house-history scraper
Stage 6 of YandexRealtyScraper v1 (Wave 4 / Worker C — parallel with
yandex_detail.py and yandex_newbuilding.py).

Module: app/services/scrapers/yandex_valuation.py
- YandexValuationScraper(BaseScraper) — fetch_house_history(address, ...)
  URL: GET /otsenka-kvartiry-po-adresu-onlayn/?address=...&offerCategory=...
       &offerType=...&page=N
  ANONYMOUS — no cookies, no auth (vs Cian Calculator).
- ValuationHouseMeta (year_built, total_floors, house_type, ceiling_height,
  has_lift, total_objects, has_panorama)
- ValuationHistoryItem (area_m2, rooms, floor, start/last price + ppm2,
  publish_date DMY, exposure_days, status)
- YandexValuationResult — house + history_items[] + pagination metadata
- Two-strategy history extraction: data-test container (if present), else
  text-chunk-around-DMY-date fallback with dedup by (date, area, floor).
- _RE_PRICE_TOKEN uses negative lookahead (?!\s*за\s*м²) to exclude ppm2
  tokens from total-price extraction.

Tests: 16 unit tests against fixture HTML. All pass. Ruff clean.
2026-05-23 16:40:23 +03:00
..
app feat(tradein): yandex_valuation.py — anonymous house-history scraper 2026-05-23 16:40:23 +03:00
data/sql feat(tradein): SQL 040-046 — matching schema delta (Phase 1.1) (#464) 2026-05-23 13:30:22 +00:00
tests feat(tradein): yandex_valuation.py — anonymous house-history scraper 2026-05-23 16:40:23 +03:00
.dockerignore feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
Dockerfile feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
pyproject.toml feat(tradein): scrape_pipeline.py — Avito full orchestrator (search → houses → detail) (#451) 2026-05-23 12:55:13 +00:00