gendesign/tradein-mvp/backend/tests
lekss361 5f92e94695 feat(tradein): yandex_newbuilding.py — ЖК landing parser (149 selectors + NLP)
Stage 5 of YandexRealtyScraper v1 (Wave 4 / Worker B — parallel with
yandex_detail.py and yandex_valuation.py).

Module: app/services/scrapers/yandex_newbuilding.py
- YandexNewbuildingScraper(BaseScraper) — fetch_jk(slug, id, city)
  URL: /{city}/kupit/novostrojka/<slug>-<id>/
- YandexNewbuildingInfo Pydantic model (ext_id/slug, name, address, lat/lon,
  house_class, commission_year/month, total_floors, corpus_count, total_area_ha,
  developer_name/url + other_jk, rating + ratings_count + text_reviews_count,
  description, metro_stations, house_type)
- Inline coord extraction (Yandex unique: lat/lon visible in raw HTML within
  city range filter)
- NLP regex: floors-towers, area-ha, commission date, corpus count (word→int),
  rating + counts, metro inline
- Helpers: _find_section_text (h2/h3 → next siblings), _parse_corpus_count
  (word/digit), _parse_metro, _extract_jk_address

Tests: 28 unit tests against Татлин-like fixture HTML. All pass. Ruff clean.
2026-05-23 16:39:12 +03:00
..
__init__.py feat(tradein): avito_imv.py — Avito IMV evaluation API client (2 requests) (#444) 2026-05-23 12:16:47 +00:00
test_api_avito_stage4a.py feat(tradein): Stage 4a — API endpoints for Avito enrichment + IMV benchmark UI (#460) 2026-05-23 13:34:38 +00:00
test_avito_detail_parse.py feat(tradein): avito_detail.py — detail page parser (30+ fields incl. domoteka) (#443) 2026-05-23 12:17:15 +00:00
test_avito_houses_parse.py feat(tradein): avito_houses.py — Houses Catalog parser (state + reviews + history + recs) (#449) 2026-05-23 12:37:24 +00:00
test_avito_imv_parse.py feat(tradein): avito_imv.py — Avito IMV evaluation API client (2 requests) (#444) 2026-05-23 12:16:47 +00:00
test_base_save_listings.py feat(tradein): extend base.py save_listings to persist Cian-specific columns (PR #450 follow-up) (#455) 2026-05-23 13:05:20 +00:00
test_cian_detail.py feat(tradein): cian_session cookies management + admin endpoints (Wave 4 Worker A) (#457) 2026-05-23 13:22:00 +00:00
test_cian_newbuilding.py feat(tradein): cian_newbuilding.py — ЖК catalog scraper (chart + reliability + offers, Wave 4 Worker C) (#459) 2026-05-23 13:23:11 +00:00
test_cian_serp_scraper.py feat(tradein): cian.py SERP refactor — state-based extraction (137 fields, no jitter) (#450) 2026-05-23 12:52:04 +00:00
test_cian_session.py feat(tradein): cian_session cookies management + admin endpoints (Wave 4 Worker A) (#457) 2026-05-23 13:22:00 +00:00
test_cian_state_parser.py feat(tradein): cian_state_parser shared utility + ScrapedLot Cian fields (#447) 2026-05-23 12:35:01 +00:00
test_estimator_imv_integration.py feat(tradein): integrate Avito IMV as 5th evaluation source (on-demand cached) (#452) 2026-05-23 13:08:22 +00:00
test_scrape_pipeline.py feat(tradein): scrape_pipeline.py — Avito full orchestrator (search → houses → detail) (#451) 2026-05-23 12:55:13 +00:00
test_yandex_helpers.py feat(tradein): yandex_helpers.py — JSON-LD + regex + date + NLP + money helpers (#456) 2026-05-23 13:14:11 +00:00
test_yandex_newbuilding.py feat(tradein): yandex_newbuilding.py — ЖК landing parser (149 selectors + NLP) 2026-05-23 16:39:12 +03:00
test_yandex_realty_serp.py feat(tradein): yandex_realty.py — DOM SERP refactor (vtorichka, 23 cards/page) 2026-05-23 16:21:47 +03:00