feat(cian): collect price history via BrowserFetcher (fixes silent no-op backfill) #1657
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#1657
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/cian-browser-price-history"
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
Makes the normal server-side cian scraper collect price history — no more dependency on the local Playwright runner.
Problem
offer_price_historywas frozen at 2026-05-24 (7125 rows; 14274 active cian listings with zero history).cian_history_backfillran nightlydone, listings_succeeded:100but wrote 0 rows — a silent no-op: curl_cffifetch_detailcan't seepriceChanges(JS-rendered_cianConfig['frontend-offer-card'].defaultState). Proven on prod: a listing with 6 known history rows → curl_cffiprice_changes=0.Fix
Route the backfill's detail fetch through the existing
BrowserFetcher(camoufoxtradein-browserservice), which renders JS. Proven on prod:BrowserFetcher().fetch(<cian detail>)returns HTML containingpriceChanges({changeTime, priceData:{price}}).cian_detail.fetch_detail— newbrowser_fetcher: BrowserFetcher | Noneparam; when provided, fetches via browser; curl_cffi path unchanged when None (back-compat)._extract_price_changes— extended to readofferData.priceChanges(browser HTML location) +priceData.pricenesting, in addition to the legacyoffer.priceChangesflat form. (The pre-existing parser did NOT handle the browser format — this was necessary.)backfill_cian_history— opens oneBrowserFetcherper run, passes it to everyfetch_detail. Drains the 14274 backlog over nightly runs + stays current. Cookieless (browser-mode doesn't need the DB cookies).Prod verification
BrowserFetcher+ updated parser on listing 328647045 → 10 price_changes extracted (DB had 6 older rows). Mechanism proven end-to-end.Test plan
cian_history_backfillrun growsoffer_price_historypast 2026-05-24Refs #1575, #759