Commit graph

3 commits

Author SHA1 Message Date
bdb9f3dd09 fix(tradein): Yandex listing_date extraction — keyword + absolute-no-year
Production: Yandex Realty имеет 60% listings с listing_date=NULL (2234/3704).
Audit показал parse_listing_date() ловил только absolute с годом
(«9 мая 2026») и relative numeric («5 дней назад»), но Yandex SERP
для свежих cards чаще использует:
- Keyword: «сегодня в 12:30», «вчера», «позавчера», «только что»
- Absolute без года: «18 мая» (год inferred)

Changes:
- yandex_helpers.py:
  * RE_RU_DATE_NO_YEAR — regex для absolute без \d{4}
  * _RU_MONTH_PREFIXES dict для day+month → date
  * parse_listing_date(): 4 fallback tiers
    1) keyword shortcuts
    2) absolute с годом (existing)
    3) absolute без года → infer current year, rollback на prev если future >30d
    4) relative numeric (existing)
- tests: 3 new test groups (keyword/absolute-no-year/relative-still-works),
  41/41 pass

Impact: linkage rate в /sales-vs-listings (PR K) для Yandex pairs
повысится с 40% → ~90% после next sweep. Existing 2234 NULL — будут
re-extracted при periodic scrape (URL остался).

Mirrors PR N (Avito same fix). Pattern теперь consistent между scrapers.

Refs #564.
2026-05-27 18:11:01 +05:00
aa70e9e155 fix(tradein): yandex_realty captures house number + parse_rub strips NBSP (#593)
All checks were successful
Deploy Trade-In / changes (push) Successful in 5s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / build-backend (push) Successful in 55s
Deploy Trade-In / deploy (push) Successful in 42s
2026-05-27 07:23:36 +00:00
962daf2d47 feat(tradein): yandex_helpers.py — JSON-LD + regex + date + NLP + money helpers (#456)
All checks were successful
Deploy Trade-In / changes (push) Successful in 5s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / deploy (push) Successful in 29s
Deploy Trade-In / build-backend (push) Successful in 39s
2026-05-23 13:14:11 +00:00