gendesign/tradein-mvp/backend/app/services
lekss361 961bdc0225 fix(yandex-valuation): tighten area regex + chronological date ordering
Three parser quality bugs observed on prod (Базовый 52 sweep, 132 rows):

A. RE_ITEM_AREA captured year+area concat like '202442,6' from chunked text
   where DOM whitespace was stripped between publish-year and area tokens.
   Added negative lookbehind + 4-digit cap on whole part.

B. Same regex sometimes matched a sub-fragment '2,2' inside '52,2' — same
   root cause, fixed by the tightened regex.

C. publish_date / removed_date were assigned by page-text order, not
   chronologically. ~1% of rows on prod had removed < publish. Sort the
   parsed date list before splitting.

Cap from prior PR #538 stays as belt-and-suspenders for any junk that
still slips through.
2026-05-24 18:28:22 +03:00
..
exporters fix(tradein): security hotfix — C-3 config default + C-4 empty estimate persist + C-6 PDF URL allowlist (#435) 2026-05-23 09:38:23 +00:00
matching fix(tradein-matching): pg_advisory_xact_lock to prevent duplicate house INSERTs (#501) 2026-05-24 10:52:10 +00:00
scrapers fix(yandex-valuation): tighten area regex + chronological date ordering 2026-05-24 18:28:22 +03:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
brand.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
cache.py feat(tradein): Phase 3.2 — /api/v1/search endpoint + Redis cache (#479) 2026-05-23 14:44:22 +00:00
cian_session.py fix(tradein): CIAN_REQUIRED_COOKIES — add real auth cookies (DMIR_AUTH + Cian session) (#480) 2026-05-23 14:52:24 +00:00
estimator.py feat(tradein/cian): surface valuation chart + rent + change-pct on /trade-in (#530) 2026-05-24 14:32:54 +00:00
geocoder.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
house_metadata.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
image_sanitizer.py fix(tradein-photos): sanitize uploaded images via Pillow re-encode (#511) 2026-05-24 11:32:04 +00:00
scheduler.py feat(tradein): in-app scheduler — UI-managed schedule (replaces SSH crontab) (#482) 2026-05-23 14:54:25 +00:00
scrape_pipeline.py fix(tradein/avito): anti-bot hardening — sleep + abort + shared session (#487) 2026-05-23 20:08:40 +00:00
scrape_runs.py fix(tradein/avito): anti-bot hardening — sleep + abort + shared session (#487) 2026-05-23 20:08:40 +00:00
scraper_settings.py feat(tradein): global scraper delay setting (applies across all scrapers) (#485) 2026-05-23 15:43:28 +00:00
search_query.py feat(tradein): Phase 3.2 — /api/v1/search endpoint + Redis cache (#479) 2026-05-23 14:44:22 +00:00