fix(avito): classify novostroyki by item-development-name marker; map переуступка sale_type #1716
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#1716
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/avito-novostroyki-segment"
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
Fixes avito novostroyki being 100% mislabeled
vtorichka. The producer (_dom_card_to_lot) classified segment by URL pattern:if "/kvartiry/" in href → vtorichka— but EVERY avito apartment URL (incl. novostroyki) contains/kvartiry/, so the/novostroyki/branch was dead code. Prod: avito novostroyki=0 despite the geo-anchored sweep ingesting them (it hits the generic/kvartiry/prodam-...SERP = both segments mixed).Verified (home IP DOM, this session)
SERP card discriminator: novostroyki cards carry
data-marker="item-development-name"(ЖК name), secondary do not — measured novostroyka SERP 4/4 present, vtorichka 0/12. Example mislabeled row: source_id 8043003287 (ЖК «Федерация», ДДУ переуступка) stored as vtorichka.Changes (2 edits)
avito.py _dom_card_to_lot: segment now"novostroyki" if card.css_first('[data-marker="item-development-name"]') else "vtorichka"; removed dead href branches.avito_detail.py _SALE_TYPE_MAP:+"переуступка":"assignment"(was → None; переуступка = DDU assignment, novostroyka signal).No DB backfill (existing rows self-heal on re-scrape); newbuilding_id/url capture deferred to a follow-up.
Test plan
pytest tests/ -k avito→ 212 passed; ruff cleanSELECT listing_segment,count(*) FROM listings WHERE source='avito' AND last_seen_at::date=CURRENT_DATE GROUP BY 1shows novostroyki>0Refs #1188