gendesign/tradein-mvp/backend/app
lekss361 f9e0b6bcbe feat(tradein): yandex_detail.py — Product JSON-LD + DOM detail parser
Stage 4 of YandexRealtyScraper v1 (Wave 4 / Worker A — parallel with
yandex_newbuilding.py and yandex_valuation.py).

Module: app/services/scrapers/yandex_detail.py
- YandexDetailScraper(BaseScraper) — async fetch_detail(offer_url)
- DetailEnrichment Pydantic model (offer_id, price/title/rooms/area/floor,
  description, sale_type, views, publish_date, agency block, metro stations,
  photos 8 sizes, newbuilding linkage, NLP best-effort fields)
- Helpers: _find_section_text(h2/h3 -> next siblings), _parse_metro_stations,
  _extract_relative_date, _extract_seller_name, _parse_title

Price source: Product JSON-LD offers.price (exact int) — falls back to None
if missing. Photos: 8 sizes from Product.image[] array.
NLP: parse_house_type / RE_YEAR / RE_METRO_WALK from description text
(best-effort — None when not present).

Tests: 35 unit tests against hand-crafted fixture HTML. All pass. Ruff clean.
2026-05-23 16:38:02 +03:00
..
api feat(tradein): cian_session cookies management + admin endpoints (Wave 4 Worker A) (#457) 2026-05-23 13:22:00 +00:00
core feat(tradein): cian_session cookies management + admin endpoints (Wave 4 Worker A) (#457) 2026-05-23 13:22:00 +00:00
schemas fix(tradein): восстановленная оценка показывает этаж/площадь, не 0/0 2026-05-22 15:50:19 +05:00
services feat(tradein): yandex_detail.py — Product JSON-LD + DOM detail parser 2026-05-23 16:38:02 +03:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
main.py feat(tradein): мониторинг ошибок через GlitchTip (#396) 2026-05-22 11:18:26 +05:00