fix(tradein): Yandex listing_date — keyword + absolute-no-year #602
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#602
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/yandex-listing-date-keyword-formats"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Mirror к PR N (#601 Avito). Yandex Realty имел 60% NULL listing_date (2234/3704) —
parse_listing_date()ловил только absolute с годом и relative numeric, пропускал «сегодня», «вчера», «18 мая» (без года).Изменения
parse_listing_date()теперь 4-tier fallback:RE_RU_DATE_NO_YEARregex +_RU_MONTH_PREFIXESdictTests
41/41 pass (38 existing + 3 new groups). Ruff clean.
Impact
Linkage rate в
/sales-vs-listings(PR K) для Yandex pairs повысится 40% → ~90% после next sweep. Existing 2234 NULL — будут re-extracted на periodic scrape.Pattern теперь consistent с Avito (PR N #601).
Refs #564.
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.